diff options
Diffstat (limited to 'vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go')
| -rw-r--r-- | vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go | 9387 |
1 files changed, 4935 insertions, 4452 deletions
diff --git a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go index b2542c5fd..543b39b82 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_freebsd_amd64.go @@ -31,7 +31,6 @@ const BITVEC_MXHASH = 0 const BITVEC_NBIT = 0 const BITVEC_NELEM = 0 const BITVEC_NINT = 0 -const BITVEC_NPTR = 0 const BITVEC_SZ = 512 const BITVEC_SZELEM = 8 const BITVEC_TELEM = 0 @@ -85,6 +84,7 @@ const BTS_PAGESIZE_FIXED = 2 const BTS_PENDING = 128 const BTS_READ_ONLY = 1 const BTS_SECURE_DELETE = 4 +const BT_MAX_LOCAL = 65501 const BUFSIZ = 1024 const BYTE_ORDER = 1234 const CACHE_STALE = 0 @@ -1423,6 +1423,7 @@ const SQLITE_ACCESS_EXISTS = 0 const SQLITE_ACCESS_READ = 2 const SQLITE_ACCESS_READWRITE = 1 const SQLITE_AFF_BLOB = 65 +const SQLITE_AFF_DEFER = 88 const SQLITE_AFF_FLEXNUM = 70 const SQLITE_AFF_INTEGER = 68 const SQLITE_AFF_MASK = 71 @@ -1662,6 +1663,7 @@ const SQLITE_FAIL = 3 const SQLITE_FAULTINJECTOR_COUNT = 1 const SQLITE_FAULTINJECTOR_MALLOC = 0 const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE = 31 +const SQLITE_FCNTL_BLOCK_ON_CONNECT = 44 const SQLITE_FCNTL_BUSYHANDLER = 15 const SQLITE_FCNTL_CHUNK_SIZE = 6 const SQLITE_FCNTL_CKPT_DONE = 37 @@ -1872,6 +1874,7 @@ const SQLITE_MAX_FILE_FORMAT = 4 const SQLITE_MAX_FUNCTION_ARG = 1000 const SQLITE_MAX_LENGTH = 1000000000 const SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000 +const SQLITE_MAX_LOG_MESSAGE = 700 const SQLITE_MAX_MEMORY = 0 const SQLITE_MAX_MMAP_SIZE = 2147418112 const SQLITE_MAX_PAGE_COUNT = 4294967294 @@ -2034,6 +2037,7 @@ const SQLITE_SERIALIZE_NOCOPY = 1 const SQLITE_SESSION_CONFIG_STRMSIZE = 1 const SQLITE_SESSION_OBJCONFIG_ROWID = 2 const SQLITE_SESSION_OBJCONFIG_SIZE = 1 +const SQLITE_SETLK_BLOCK_ON_CONNECT = 1 const SQLITE_SET_LOCKPROXYFILE = 3 const SQLITE_SHM_EXCLUSIVE = 8 const SQLITE_SHM_LOCK = 2 @@ -2042,7 +2046,7 @@ const SQLITE_SHM_SHARED = 4 const SQLITE_SHM_UNLOCK = 1 const SQLITE_SORTER_PMASZ = 250 const SQLITE_SOUNDEX = 1 -const SQLITE_SOURCE_ID = "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1" +const SQLITE_SOURCE_ID = "2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95" const SQLITE_SO_ASC = 0 const SQLITE_SO_DESC = 1 const SQLITE_SO_UNDEFINED = -1 @@ -2152,8 +2156,8 @@ const SQLITE_UTF16LE = 2 const SQLITE_UTF16NATIVE = 2 const SQLITE_UTF16_ALIGNED = 8 const SQLITE_UTF8 = 1 -const SQLITE_VERSION = "3.49.2" -const SQLITE_VERSION_NUMBER = 3049002 +const SQLITE_VERSION = "3.50.1" +const SQLITE_VERSION_NUMBER = 3050001 const SQLITE_VTABRISK_High = 2 const SQLITE_VTABRISK_Low = 0 const SQLITE_VTABRISK_Normal = 1 @@ -3371,6 +3375,9 @@ const etBUFSIZE = 70 const etCHARX = 8 const etDECIMAL = 16 const etDYNSTRING = 6 +const etESCAPE_Q = 10 +const etESCAPE_q = 9 +const etESCAPE_w = 14 const etEXP = 2 const etFLOAT = 1 const etGENERIC = 3 @@ -3380,9 +3387,6 @@ const etPERCENT = 7 const etPOINTER = 13 const etRADIX = 0 const etSIZE = 4 -const etSQLESCAPE = 9 -const etSQLESCAPE2 = 10 -const etSQLESCAPE3 = 14 const etSRCITEM = 12 const etSTRING = 5 const etTOKEN = 11 @@ -4426,6 +4430,7 @@ type Tsqlite3_api_routines = struct { Fstmt_explain uintptr Fget_clientdata uintptr Fset_clientdata uintptr + Fsetlk_timeout uintptr } type sqlite3_api_routines = Tsqlite3_api_routines @@ -4858,7 +4863,6 @@ type Tsqlite3_context = struct { Fenc Tu8 FskipFlag Tu8 Fargc Tu16 - Fargv [1]uintptr } type sqlite3_context = Tsqlite3_context @@ -6599,11 +6603,17 @@ type fts5_api1 = Tfts5_api1 ** * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement. ** * Terms in the VALUES clause of an INSERT statement ** -** The hard upper limit here is 32676. Most database people will +** The hard upper limit here is 32767. Most database people will ** tell you that in a well-normalized database, you usually should ** not have more than a dozen or so columns in any table. And if ** that is the case, there is no point in having more than a few ** dozen values in any of the other situations described above. +** +** An index can only have SQLITE_MAX_COLUMN columns from the user +** point of view, but the underlying b-tree that implements the index +** might have up to twice as many columns in a WITHOUT ROWID table, +** since must also store the primary key at the end. Hence the +** column count for Index is u16 instead of i16. */ /* @@ -6977,6 +6987,7 @@ type THashElem = struct { Fprev uintptr Fdata uintptr FpKey uintptr + Fh uint32 } type HashElem = THashElem @@ -7022,6 +7033,7 @@ type THashElem1 = struct { Fprev uintptr Fdata uintptr FpKey uintptr + Fh uint32 } type HashElem1 = THashElem1 @@ -7294,6 +7306,11 @@ type _RuneLocale = T_RuneLocale */ /* +** Work around C99 "flex-array" syntax for pre-C99 compilers, so as +** to avoid complaints from -fsanitize=strict-bounds. + */ + +/* ** Macros to compute minimum and maximum of two numbers. */ @@ -7351,6 +7368,17 @@ type i8 = Ti8 /* 1-byte signed integer */ +// C documentation +// +// /* A bitfield type for use inside of structures. Always follow with :N where +// ** N is the number of bits. +// */ +type Tbft = uint32 + +type bft = Tbft + +/* Bit Field Type */ + /* ** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value ** that can be stored in a u32 without loss of data. The value @@ -7654,7 +7682,6 @@ type TDbClientData = struct { FpNext uintptr FpData uintptr FxDestructor uintptr - FzName [1]int8 } type DbClientData = TDbClientData @@ -7724,9 +7751,9 @@ type TExpr = struct { type Expr = TExpr type TExprList = struct { - FnExpr int32 - FnAlloc int32 - Fa [1]TExprList_item + F__ccgo_align [0]uint64 + FnExpr int32 + FnAlloc int32 } type ExprList = TExprList @@ -7741,7 +7768,6 @@ type TFKey = struct { FisDeferred Tu8 FaAction [2]Tu8 FapTrigger [2]uintptr - FaCol [1]TsColMap } type FKey = TFKey @@ -7790,8 +7816,8 @@ type TFuncDefHash = struct { type FuncDefHash = TFuncDefHash type TIdList = struct { - FnId int32 - Fa [1]TIdList_item + F__ccgo_align [0]uint64 + FnId int32 } type IdList = TIdList @@ -7855,7 +7881,6 @@ type TKeyInfo = struct { FnAllField Tu16 Fdb uintptr FaSortFlags uintptr - FaColl [1]uintptr } type KeyInfo = TKeyInfo @@ -7927,19 +7952,22 @@ type TParse = struct { FzErrMsg uintptr FpVdbe uintptr Frc int32 - FcolNamesSet Tu8 - FcheckSchema Tu8 + FnQueryLoop TLogEst Fnested Tu8 FnTempReg Tu8 FisMultiWrite Tu8 FmayAbort Tu8 FhasCompound Tu8 - FokConstFactor Tu8 FdisableLookaside Tu8 FprepFlags Tu8 FwithinRJSubrtn Tu8 - FbHasWith Tu8 FmSubrtnSig Tu8 + FeTriggerOp Tu8 + FbReturning Tu8 + FeOrconf Tu8 + FdisableTriggers Tu8 + F__ccgo_align18 [1]byte + F__ccgo44 uint8 FnRangeReg int32 FiRangeReg int32 FnErr int32 @@ -7953,11 +7981,8 @@ type TParse = struct { FpConstExpr uintptr FpIdxEpr uintptr FpIdxPartExpr uintptr - FconstraintName TToken FwriteMask TyDbMask FcookieMask TyDbMask - FregRowid int32 - FregRoot int32 FnMaxArg int32 FnSelect int32 FnProgressSteps Tu32 @@ -7968,40 +7993,41 @@ type TParse = struct { FpTriggerTab uintptr FpTriggerPrg uintptr FpCleanup uintptr + FaTempReg [8]int32 + FpOuterParse uintptr + FsNameToken TToken + Foldmask Tu32 + Fnewmask Tu32 Fu1 struct { - FpReturning [0]uintptr - FaddrCrTab int32 - F__ccgo_pad2 [4]byte - } - Foldmask Tu32 - Fnewmask Tu32 - FnQueryLoop TLogEst - FeTriggerOp Tu8 - FbReturning Tu8 - FeOrconf Tu8 - FdisableTriggers Tu8 - FaTempReg [8]int32 - FpOuterParse uintptr - FsNameToken TToken - FsLastToken TToken - FnVar TynVar - FiPkSortOrder Tu8 - Fexplain Tu8 - FeParseMode Tu8 - FnVtabLock int32 - FnHeight int32 - FaddrExplain int32 - FpVList uintptr - FpReprepare uintptr - FzTail uintptr - FpNewTable uintptr - FpNewIndex uintptr - FpNewTrigger uintptr - FzAuthContext uintptr - FsArg TToken - FapVtabLock uintptr - FpWith uintptr - FpRename uintptr + Fd [0]struct { + FpReturning uintptr + } + Fcr struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + } + } + FsLastToken TToken + FnVar TynVar + FiPkSortOrder Tu8 + Fexplain Tu8 + FeParseMode Tu8 + FnVtabLock int32 + FnHeight int32 + FaddrExplain int32 + FpVList uintptr + FpReprepare uintptr + FzTail uintptr + FpNewTable uintptr + FpNewIndex uintptr + FpNewTrigger uintptr + FzAuthContext uintptr + FsArg TToken + FapVtabLock uintptr + FpWith uintptr + FpRename uintptr } type Parse = TParse @@ -8019,7 +8045,7 @@ type TPreUpdate = struct { FpCsr uintptr Fop int32 FaRecord uintptr - Fkeyinfo TKeyInfo + FpKeyinfo uintptr FpUnpacked uintptr FpNewUnpacked uintptr FiNewReg int32 @@ -8031,6 +8057,7 @@ type TPreUpdate = struct { FpTab uintptr FpPk uintptr FapDflt uintptr + FkeyinfoSpace [32]Tu8 } type PreUpdate = TPreUpdate @@ -8179,9 +8206,9 @@ type TSrcItem = struct { type SrcItem = TSrcItem type TSrcList = struct { - FnSrc int32 - FnAlloc Tu32 - Fa [1]TSrcItem + F__ccgo_align [0]uint64 + FnSrc int32 + FnAlloc Tu32 } type SrcList = TSrcList @@ -8236,6 +8263,7 @@ type TTable = struct { } FpTrigger uintptr FpSchema uintptr + FaHx [16]Tu8 } type Table = TTable @@ -8416,7 +8444,6 @@ type TWhereInfo = struct { FrevMask TBitmask FsWC TWhereClause FsMaskSet TWhereMaskSet - Fa [1]TWhereLevel } type WhereInfo = TWhereInfo @@ -8458,7 +8485,6 @@ type TWith = struct { FnCte int32 FbView int32 FpOuter uintptr - Fa [1]TCte } type With = TWith @@ -9028,8 +9054,8 @@ type TRecordCompare = uintptr type RecordCompare = TRecordCompare -/* Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on -** each VDBE opcode. +/* Use SQLITE_ENABLE_EXPLAIN_COMMENTS to enable generation of extra +** comments on each VDBE opcode. ** ** Use the SQLITE_ENABLE_MODULE_COMMENTS macro to see some extra no-op ** comments in VDBE programs that show key decision points in the code @@ -9876,6 +9902,7 @@ type TTable1 = struct { } FpTrigger uintptr FpSchema uintptr + FaHx [16]Tu8 } type Table1 = TTable1 @@ -9957,11 +9984,13 @@ type TFKey1 = struct { FisDeferred Tu8 FaAction [2]Tu8 FapTrigger [2]uintptr - FaCol [1]TsColMap } type FKey1 = TFKey1 +/* The size (in bytes) of an FKey object holding N columns. The answer +** does NOT include space to hold the zTo name. */ + /* ** SQLite supports many different ways to resolve a constraint ** error. ROLLBACK processing means that a constraint violation @@ -10010,11 +10039,12 @@ type TKeyInfo1 = struct { FnAllField Tu16 Fdb uintptr FaSortFlags uintptr - FaColl [1]uintptr } type KeyInfo1 = TKeyInfo1 +/* The size (in bytes) of a KeyInfo object with up to N fields */ + /* ** Allowed bit values for entries in the KeyInfo.aSortFlags[] array. */ @@ -10416,13 +10446,16 @@ type Expr1 = TExpr1 ** expression. */ type TExprList1 = struct { - FnExpr int32 - FnAlloc int32 - Fa [1]TExprList_item + F__ccgo_align [0]uint64 + FnExpr int32 + FnAlloc int32 } type ExprList1 = TExprList1 +/* The size (in bytes) of an ExprList object that is big enough to hold +** as many as N expressions. */ + /* ** Allowed values for Expr.a.eEName */ @@ -10443,12 +10476,14 @@ type ExprList1 = TExprList1 ** If "a" is the k-th column of table "t", then IdList.a[0].idx==k. */ type TIdList1 = struct { - FnId int32 - Fa [1]TIdList_item + F__ccgo_align [0]uint64 + FnId int32 } type IdList1 = TIdList1 +/* The size (in bytes) of an IdList object that can hold up to N IDs. */ + /* ** Allowed values for IdList.eType, which determines which value of the a.u4 ** is valid. @@ -10554,13 +10589,19 @@ type OnOrUsing1 = TOnOrUsing1 ** */ type TSrcList1 = struct { - FnSrc int32 - FnAlloc Tu32 - Fa [1]TSrcItem + F__ccgo_align [0]uint64 + FnSrc int32 + FnAlloc Tu32 } type SrcList1 = TSrcList1 +/* Size (in bytes) of a SrcList object that can hold as many as N +** SrcItem objects. */ + +/* Size (in bytes( of a SrcList object that holds 1 SrcItem. This is a +** special case of SZ_SRCITEM(1) that comes up often. */ + /* ** Permitted values of the SrcList.a.jointype field */ @@ -10921,19 +10962,22 @@ type TParse1 = struct { FzErrMsg uintptr FpVdbe uintptr Frc int32 - FcolNamesSet Tu8 - FcheckSchema Tu8 + FnQueryLoop TLogEst Fnested Tu8 FnTempReg Tu8 FisMultiWrite Tu8 FmayAbort Tu8 FhasCompound Tu8 - FokConstFactor Tu8 FdisableLookaside Tu8 FprepFlags Tu8 FwithinRJSubrtn Tu8 - FbHasWith Tu8 FmSubrtnSig Tu8 + FeTriggerOp Tu8 + FbReturning Tu8 + FeOrconf Tu8 + FdisableTriggers Tu8 + F__ccgo_align18 [1]byte + F__ccgo44 uint8 FnRangeReg int32 FiRangeReg int32 FnErr int32 @@ -10947,11 +10991,8 @@ type TParse1 = struct { FpConstExpr uintptr FpIdxEpr uintptr FpIdxPartExpr uintptr - FconstraintName TToken FwriteMask TyDbMask FcookieMask TyDbMask - FregRowid int32 - FregRoot int32 FnMaxArg int32 FnSelect int32 FnProgressSteps Tu32 @@ -10962,40 +11003,41 @@ type TParse1 = struct { FpTriggerTab uintptr FpTriggerPrg uintptr FpCleanup uintptr + FaTempReg [8]int32 + FpOuterParse uintptr + FsNameToken TToken + Foldmask Tu32 + Fnewmask Tu32 Fu1 struct { - FpReturning [0]uintptr - FaddrCrTab int32 - F__ccgo_pad2 [4]byte - } - Foldmask Tu32 - Fnewmask Tu32 - FnQueryLoop TLogEst - FeTriggerOp Tu8 - FbReturning Tu8 - FeOrconf Tu8 - FdisableTriggers Tu8 - FaTempReg [8]int32 - FpOuterParse uintptr - FsNameToken TToken - FsLastToken TToken - FnVar TynVar - FiPkSortOrder Tu8 - Fexplain Tu8 - FeParseMode Tu8 - FnVtabLock int32 - FnHeight int32 - FaddrExplain int32 - FpVList uintptr - FpReprepare uintptr - FzTail uintptr - FpNewTable uintptr - FpNewIndex uintptr - FpNewTrigger uintptr - FzAuthContext uintptr - FsArg TToken - FapVtabLock uintptr - FpWith uintptr - FpRename uintptr + Fd [0]struct { + FpReturning uintptr + } + Fcr struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + } + } + FsLastToken TToken + FnVar TynVar + FiPkSortOrder Tu8 + Fexplain Tu8 + FeParseMode Tu8 + FnVtabLock int32 + FnHeight int32 + FaddrExplain int32 + FpVList uintptr + FpReprepare uintptr + FzTail uintptr + FpNewTable uintptr + FpNewIndex uintptr + FpNewTrigger uintptr + FzAuthContext uintptr + FsArg TToken + FapVtabLock uintptr + FpWith uintptr + FpRename uintptr } type Parse1 = TParse1 @@ -11361,11 +11403,13 @@ type TWith1 = struct { FnCte int32 FbView int32 FpOuter uintptr - Fa [1]TCte } type With1 = TWith1 +/* The size (in bytes) of a With object that can hold as many +** as N different CTEs. */ + /* ** The Cte object is not guaranteed to persist for the entire duration ** of code generation. (The query flattener or other parser tree @@ -11395,11 +11439,13 @@ type TDbClientData1 = struct { FpNext uintptr FpData uintptr FxDestructor uintptr - FzName [1]int8 } type DbClientData1 = TDbClientData1 +/* The size (in bytes) of a DbClientData object that can has a name +** that is N bytes long, including the zero-terminator. */ + /* ** This object is used in various ways, most (but not all) related to window ** functions. @@ -12565,7 +12611,6 @@ type TVdbeSorter = struct { FiPrev Tu8 FnTask Tu8 FtypeMask Tu8 - FaTask [1]TSortSubtask } type VdbeSorter = TVdbeSorter @@ -12643,7 +12688,6 @@ type TVdbeCursor = struct { FpayloadSize Tu32 FszRow Tu32 FpCache uintptr - FaType [1]Tu32 } type VdbeCursor = TVdbeCursor @@ -12681,11 +12725,16 @@ type TVdbeCursor1 = struct { FpayloadSize Tu32 FszRow Tu32 FpCache uintptr - FaType [1]Tu32 } type VdbeCursor1 = TVdbeCursor1 +/* +** The size (in bytes) of a VdbeCursor object that has an nField value of N +** or less. The value of SZ_VDBECURSOR(n) is guaranteed to be a multiple +** of 8. + */ + /* Return true if P is a null-only cursor */ @@ -12896,21 +12945,14 @@ type Tsqlite3_context1 = struct { Fenc Tu8 FskipFlag Tu8 Fargc Tu16 - Fargv [1]uintptr } type sqlite3_context1 = Tsqlite3_context1 -// C documentation -// -// /* A bitfield type for use inside of structures. Always follow with :N where -// ** N is the number of bits. -// */ -type Tbft = uint32 - -type bft = Tbft - -/* Bit Field Type */ +/* +** The size (in bytes) of an sqlite3_context object that holds N +** argv[] arguments. + */ // C documentation // @@ -13043,7 +13085,7 @@ type TPreUpdate1 = struct { FpCsr uintptr Fop int32 FaRecord uintptr - Fkeyinfo TKeyInfo + FpKeyinfo uintptr FpUnpacked uintptr FpNewUnpacked uintptr FiNewReg int32 @@ -13055,6 +13097,7 @@ type TPreUpdate1 = struct { FpTab uintptr FpPk uintptr FapDflt uintptr + FkeyinfoSpace [32]Tu8 } type PreUpdate1 = TPreUpdate1 @@ -13192,7 +13235,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin var pMutex, v1 uintptr _, _ = pMutex, v1 if op < 0 || op >= libc.Int32FromUint64(libc.Uint64FromInt64(80)/libc.Uint64FromInt64(8)) { - return _sqlite3MisuseError(tls, int32(24299)) + return _sqlite3MisuseError(tls, int32(24453)) } if _statMutex[op] != 0 { v1 = _sqlite3Pcache1Mutex(tls) @@ -13364,7 +13407,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p } pSchema = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i1)*32))).FpSchema if pSchema != uintptr(0) { - *(*int32)(unsafe.Pointer(bp)) = int32(uint32(*(*int32)(unsafe.Pointer(bp))) + libc.Uint32FromInt32((*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_sqlite3Config.Fm.FxRoundup})))(tls, int32(32)))*((*TSchema)(unsafe.Pointer(pSchema)).FtblHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FtrigHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FidxHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FfkeyHash.Fcount)) + *(*int32)(unsafe.Pointer(bp)) = int32(uint32(*(*int32)(unsafe.Pointer(bp))) + libc.Uint32FromInt32((*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_sqlite3Config.Fm.FxRoundup})))(tls, int32(40)))*((*TSchema)(unsafe.Pointer(pSchema)).FtblHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FtrigHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FidxHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FfkeyHash.Fcount)) *(*int32)(unsafe.Pointer(bp)) = int32(uint64(*(*int32)(unsafe.Pointer(bp))) + Xsqlite3_msize(tls, (*TSchema)(unsafe.Pointer(pSchema)).FtblHash.Fht)) *(*int32)(unsafe.Pointer(bp)) = int32(uint64(*(*int32)(unsafe.Pointer(bp))) + Xsqlite3_msize(tls, (*TSchema)(unsafe.Pointer(pSchema)).FtrigHash.Fht)) *(*int32)(unsafe.Pointer(bp)) = int32(uint64(*(*int32)(unsafe.Pointer(bp))) + Xsqlite3_msize(tls, (*TSchema)(unsafe.Pointer(pSchema)).FidxHash.Fht)) @@ -15052,7 +15095,7 @@ func _daysAfterMonday(tls *libc.TLS, pDate uintptr) (r int32) { // ** In other words, return the day of the week according // ** to this code: // ** -// ** 0=Sunday, 1=Monday, 2=Tues, ..., 6=Saturday +// ** 0=Sunday, 1=Monday, 2=Tuesday, ..., 6=Saturday // */ func _daysAfterSunday(tls *libc.TLS, pDate uintptr) (r int32) { return int32(((*TDateTime)(unsafe.Pointer(pDate)).FiJD+libc.Int64FromInt32(129600000))/libc.Int64FromInt32(86400000)) % int32(7) @@ -17756,17 +17799,17 @@ var _fmtinfo = [23]Tet_info{ 4: { Ffmttype: int8('q'), Fflags: uint8(4), - Ftype1: uint8(etSQLESCAPE), + Ftype1: uint8(etESCAPE_q), }, 5: { Ffmttype: int8('Q'), Fflags: uint8(4), - Ftype1: uint8(etSQLESCAPE2), + Ftype1: uint8(etESCAPE_Q), }, 6: { Ffmttype: int8('w'), Fflags: uint8(4), - Ftype1: uint8(etSQLESCAPE3), + Ftype1: uint8(etESCAPE_w), }, 7: { Ffmttype: int8('c'), @@ -17963,22 +18006,23 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li bp := tls.Alloc(144) defer tls.Free(144) var bArgList, base Tu8 - var bufpt, cset, escarg, infop, pArgList, pExpr, pItem, pSel, pToken, pre, z, zExtra, zOut, v103, v11, v14, v15, v17, v20, v21, v23, v24, v4, v45, v46, v47, v48, v49, v52, v55, v57, v59, v61, v62, v64, v67, v68, v70, v72, v75, v76, v77, v78, v79, v80, v81, v82, v83, v89, v91, v94, v98, p92 uintptr - var c, e2, exp, i, iRound, idx, ii, isnull, ix, j, length, nOut, nPad, needQuote, nn, precision, width, x, v10, v110, v111, v16, v18, v19, v2, v22, v3, v51, v56, v58, v60, v65, v66, v71, v73, v74, v85, v86, v87, v88, v90, v93, v96, v97 int32 + var bufpt, cset, escarg, infop, pArgList, pExpr, pItem, pSel, pToken, pre, z, zExtra, zOut, v103, v11, v14, v15, v17, v20, v21, v23, v24, v4, v45, v46, v47, v48, v49, v52, v55, v57, v59, v61, v62, v64, v67, v68, v70, v72, v75, v76, v77, v78, v79, v80, v81, v82, v83, v89, v91, v94, v97, p92 uintptr + var c, e2, exp, i, iRound, idx, ii, ix, j, length, nOut, nPad, needQuote, nn, precision, width, x, v10, v114, v122, v123, v16, v18, v19, v2, v22, v3, v51, v56, v58, v60, v65, v66, v71, v73, v74, v85, v86, v87, v88, v90, v93, v96 int32 var cThousand, done, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, xtype, v5, v6, v7, v8, v9 TetByte var ch, px, wx uint32 - var ch1, prefix, q, x1, v101, v107, v54 int8 - var i1, j1, k, n1, nCopyBytes, nPrior, szBufNeeded, v, v100, v104, v106, v108, v109 Ti64 + var ch1, prefix, q, x1, v100, v107, v118, v54 int8 + var i1, j1, k, n1, nCopyBytes, nPrior, szBufNeeded, v, v104, v106, v108, v109, v110, v111, v112, v113, v115, v117, v119, v120, v121, v99 Ti64 var longvalue Tsqlite_uint64 var n Tu64 + var nBack, nCtrl Tu32 var realvalue float64 - var v102, v12 bool + var v101, v12 bool var _ /* buf at bp+0 */ [70]int8 var _ /* s at bp+72 */ TFpDecode - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bArgList, base, bufpt, c, cThousand, ch, ch1, cset, done, e2, escarg, exp, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, i, i1, iRound, idx, ii, infop, isnull, ix, j, j1, k, length, longvalue, n, n1, nCopyBytes, nOut, nPad, nPrior, needQuote, nn, pArgList, pExpr, pItem, pSel, pToken, pre, precision, prefix, px, q, realvalue, szBufNeeded, v, width, wx, x, x1, xtype, z, zExtra, zOut, v10, v100, v101, v102, v103, v104, v106, v107, v108, v109, v11, v110, v111, v12, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v3, v4, v45, v46, v47, v48, v49, v5, v51, v52, v54, v55, v56, v57, v58, v59, v6, v60, v61, v62, v64, v65, v66, v67, v68, v7, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v8, v80, v81, v82, v83, v85, v86, v87, v88, v89, v9, v90, v91, v93, v94, v96, v97, v98, p92 /* Thousands separator for %d and %u */ - xtype = uint8(etINVALID) /* Size of the rendering buffer */ - zExtra = uintptr(0) /* True if trailing zeros should be removed */ - pArgList = uintptr(0) /* Conversion buffer */ + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bArgList, base, bufpt, c, cThousand, ch, ch1, cset, done, e2, escarg, exp, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, i, i1, iRound, idx, ii, infop, ix, j, j1, k, length, longvalue, n, n1, nBack, nCopyBytes, nCtrl, nOut, nPad, nPrior, needQuote, nn, pArgList, pExpr, pItem, pSel, pToken, pre, precision, prefix, px, q, realvalue, szBufNeeded, v, width, wx, x, x1, xtype, z, zExtra, zOut, v10, v100, v101, v103, v104, v106, v107, v108, v109, v11, v110, v111, v112, v113, v114, v115, v117, v118, v119, v12, v120, v121, v122, v123, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v3, v4, v45, v46, v47, v48, v49, v5, v51, v52, v54, v55, v56, v57, v58, v59, v6, v60, v61, v62, v64, v65, v66, v67, v68, v7, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v8, v80, v81, v82, v83, v85, v86, v87, v88, v89, v9, v90, v91, v93, v94, v96, v97, v99, p92 /* Thousands separator for %d and %u */ + xtype = uint8(etINVALID) /* Size of the rendering buffer */ + zExtra = uintptr(0) /* True if trailing zeros should be removed */ + pArgList = uintptr(0) /* Conversion buffer */ /* pAccum never starts out with an empty buffer that was obtained from ** malloc(). This precondition is required by the mprintf("%z...") ** optimization. */ @@ -18227,11 +18271,11 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li goto _36 case int32(etSTRING): goto _37 - case int32(etSQLESCAPE3): + case int32(etESCAPE_w): goto _38 - case int32(etSQLESCAPE2): + case int32(etESCAPE_Q): goto _39 - case int32(etSQLESCAPE): + case int32(etESCAPE_q): goto _40 case int32(etTOKEN): goto _41 @@ -18708,29 +18752,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li } } else { ch = libc.VaUint32(&ap) - if ch < uint32(0x00080) { - (*(*[70]int8)(unsafe.Pointer(bp)))[0] = libc.Int8FromUint32(ch & uint32(0xff)) - length = int32(1) - } else { - if ch < uint32(0x00800) { - (*(*[70]int8)(unsafe.Pointer(bp)))[0] = int8(int32(0xc0) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x1f)))) - (*(*[70]int8)(unsafe.Pointer(bp)))[int32(1)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch&libc.Uint32FromInt32(0x3f)))) - length = int32(2) - } else { - if ch < uint32(0x10000) { - (*(*[70]int8)(unsafe.Pointer(bp)))[0] = int8(int32(0xe0) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x0f)))) - (*(*[70]int8)(unsafe.Pointer(bp)))[int32(1)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f)))) - (*(*[70]int8)(unsafe.Pointer(bp)))[int32(2)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch&libc.Uint32FromInt32(0x3f)))) - length = int32(3) - } else { - (*(*[70]int8)(unsafe.Pointer(bp)))[0] = int8(int32(0xf0) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(18)&libc.Uint32FromInt32(0x07)))) - (*(*[70]int8)(unsafe.Pointer(bp)))[int32(1)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x3f)))) - (*(*[70]int8)(unsafe.Pointer(bp)))[int32(2)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f)))) - (*(*[70]int8)(unsafe.Pointer(bp)))[int32(3)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch&libc.Uint32FromInt32(0x3f)))) - length = int32(4) - } - } - } + length = _sqlite3AppendOneUtf8Character(tls, bp, ch) } if precision > int32(1) { nPrior = int64(1) @@ -18845,25 +18867,29 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li ; /* %Q: Escape ' and enclose in '...' */ _38: ; - if libc.Int32FromUint8(xtype) == int32(etSQLESCAPE3) { - v97 = int32('"') - } else { - v97 = int32('\'') - } - q = int8(v97) + needQuote = 0 if bArgList != 0 { escarg = _getTextArg(tls, pArgList) } else { escarg = libc.VaUintptr(&ap) } - isnull = libc.BoolInt32(escarg == uintptr(0)) - if isnull != 0 { - if libc.Int32FromUint8(xtype) == int32(etSQLESCAPE2) { - v98 = __ccgo_ts + 1666 + if escarg == uintptr(0) { + if libc.Int32FromUint8(xtype) == int32(etESCAPE_Q) { + v97 = __ccgo_ts + 1666 } else { - v98 = __ccgo_ts + 1671 + v97 = __ccgo_ts + 1671 + } + escarg = v97 + } else { + if libc.Int32FromUint8(xtype) == int32(etESCAPE_Q) { + needQuote = int32(1) } - escarg = v98 + } + if libc.Int32FromUint8(xtype) == int32(etESCAPE_w) { + q = int8('"') + flag_alternateform = uint8(0) + } else { + q = int8('\'') } /* For %q, %Q, and %w, the precision is the number of bytes (or ** characters if the ! flags is present) to use from the input. @@ -18871,15 +18897,15 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li ** of output characters may be larger than the precision. */ k = int64(precision) - v100 = libc.Int64FromInt32(0) - n1 = v100 - i1 = v100 + v99 = libc.Int64FromInt32(0) + n1 = v99 + i1 = v99 for { - if v102 = k != 0; v102 { - v101 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1))) - ch1 = v101 + if v101 = k != 0; v101 { + v100 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1))) + ch1 = v100 } - if !(v102 && int32(v101) != 0) { + if !(v101 && int32(v100) != 0) { break } if int32(ch1) == int32(q) { @@ -18890,13 +18916,46 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li i1++ } } - goto _99 - _99: + goto _98 + _98: ; i1++ k-- } - needQuote = libc.BoolInt32(!(isnull != 0) && libc.Int32FromUint8(xtype) == int32(etSQLESCAPE2)) + if flag_alternateform != 0 { + /* For %#q, do unistr()-style backslash escapes for + ** all control characters, and for backslash itself. + ** For %#Q, do the same but only if there is at least + ** one control character. */ + nBack = uint32(0) + nCtrl = uint32(0) + k = 0 + for { + if !(k < i1) { + break + } + if int32(*(*int8)(unsafe.Pointer(escarg + uintptr(k)))) == int32('\\') { + nBack++ + } else { + if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(escarg + uintptr(k)))) <= int32(0x1f) { + nCtrl++ + } + } + goto _102 + _102: + ; + k++ + } + if nCtrl != 0 || libc.Int32FromUint8(xtype) == int32(etESCAPE_q) { + n1 += libc.Int64FromUint32(nBack + uint32(5)*nCtrl) + if libc.Int32FromUint8(xtype) == int32(etESCAPE_Q) { + n1 += int64(10) + needQuote = int32(2) + } + } else { + flag_alternateform = uint8(0) + } + } n1 += i1 + int64(3) if n1 > int64(SQLITE_PRINT_BUF_SIZE) { v103 = _printfTempBuf(tls, pAccum, n1) @@ -18910,35 +18969,98 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li } j1 = 0 if needQuote != 0 { - v104 = j1 - j1++ - *(*int8)(unsafe.Pointer(bufpt + uintptr(v104))) = q + if needQuote == int32(2) { + libc.Xmemcpy(tls, bufpt+uintptr(j1), __ccgo_ts+1678, uint64(8)) + j1 += int64(8) + } else { + v104 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v104))) = int8('\'') + } } k = i1 - i1 = 0 - for { - if !(i1 < k) { - break + if flag_alternateform != 0 { + i1 = 0 + for { + if !(i1 < k) { + break + } + v106 = j1 + j1++ + v107 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1))) + ch1 = v107 + *(*int8)(unsafe.Pointer(bufpt + uintptr(v106))) = v107 + if int32(ch1) == int32(q) { + v108 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v108))) = ch1 + } else { + if int32(ch1) == int32('\\') { + v109 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v109))) = int8('\\') + } else { + if libc.Int32FromUint8(libc.Uint8FromInt8(ch1)) <= int32(0x1f) { + *(*int8)(unsafe.Pointer(bufpt + uintptr(j1-int64(1)))) = int8('\\') + v110 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v110))) = int8('u') + v111 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v111))) = int8('0') + v112 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v112))) = int8('0') + v113 = j1 + j1++ + if int32(ch1) >= int32(0x10) { + v114 = int32('1') + } else { + v114 = int32('0') + } + *(*int8)(unsafe.Pointer(bufpt + uintptr(v113))) = int8(v114) + v115 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v115))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 1687 + uintptr(int32(ch1)&int32(0xf)))) + } + } + } + goto _105 + _105: + ; + i1++ } - v106 = j1 - j1++ - v107 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1))) - ch1 = v107 - *(*int8)(unsafe.Pointer(bufpt + uintptr(v106))) = v107 - if int32(ch1) == int32(q) { - v108 = j1 + } else { + i1 = 0 + for { + if !(i1 < k) { + break + } + v117 = j1 j1++ - *(*int8)(unsafe.Pointer(bufpt + uintptr(v108))) = ch1 + v118 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1))) + ch1 = v118 + *(*int8)(unsafe.Pointer(bufpt + uintptr(v117))) = v118 + if int32(ch1) == int32(q) { + v119 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v119))) = ch1 + } + goto _116 + _116: + ; + i1++ } - goto _105 - _105: - ; - i1++ } if needQuote != 0 { - v109 = j1 + v120 = j1 j1++ - *(*int8)(unsafe.Pointer(bufpt + uintptr(v109))) = q + *(*int8)(unsafe.Pointer(bufpt + uintptr(v120))) = int8('\'') + if needQuote == int32(2) { + v121 = j1 + j1++ + *(*int8)(unsafe.Pointer(bufpt + uintptr(v121))) = int8(')') + } } *(*int8)(unsafe.Pointer(bufpt + uintptr(j1))) = 0 length = int32(j1) @@ -18963,9 +19085,9 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li _sqlite3RecordErrorByteOffset(tls, (*Tsqlite3_str)(unsafe.Pointer(pAccum)).Fdb, (*TToken)(unsafe.Pointer(pToken)).Fz) } } - v110 = libc.Int32FromInt32(0) - width = v110 - length = v110 + v122 = libc.Int32FromInt32(0) + width = v122 + length = v122 goto _44 _42: ; @@ -18979,7 +19101,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li if (*TSrcItem)(unsafe.Pointer(pItem)).FzName != 0 { if int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x10000>>16) == 0 && int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x4>>2) == 0 && *(*uintptr)(unsafe.Pointer(pItem + 72)) != uintptr(0) { Xsqlite3_str_appendall(tls, pAccum, *(*uintptr)(unsafe.Pointer(pItem + 72))) - Xsqlite3_str_append(tls, pAccum, __ccgo_ts+1678, int32(1)) + Xsqlite3_str_append(tls, pAccum, __ccgo_ts+1704, int32(1)) } Xsqlite3_str_appendall(tls, pAccum, (*TSrcItem)(unsafe.Pointer(pItem)).FzName) } else { @@ -18989,21 +19111,21 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li if int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x4>>2) != 0 { /* Because of tag-20240424-1 */ pSel = (*TSubquery)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem + 72)))).FpSelect if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_NestedFrom) != 0 { - Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1680, libc.VaList(bp+128, (*TSelect)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1706, libc.VaList(bp+128, (*TSelect)(unsafe.Pointer(pSel)).FselId)) } else { if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_MultiValue) != 0 { - Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1690, libc.VaList(bp+128, *(*Tu32)(unsafe.Pointer(&(*TSrcItem)(unsafe.Pointer(pItem)).Fu1)))) + Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1716, libc.VaList(bp+128, *(*Tu32)(unsafe.Pointer(&(*TSrcItem)(unsafe.Pointer(pItem)).Fu1)))) } else { - Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1711, libc.VaList(bp+128, (*TSelect)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1737, libc.VaList(bp+128, (*TSelect)(unsafe.Pointer(pSel)).FselId)) } } } } } } - v111 = libc.Int32FromInt32(0) - width = v111 - length = v111 + v123 = libc.Int32FromInt32(0) + width = v123 + length = v123 goto _44 _43: ; @@ -19242,7 +19364,7 @@ func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { func _strAccumFinishRealloc(tls *libc.TLS, p uintptr) (r uintptr) { var zText, p1 uintptr _, _ = zText, p1 - zText = _sqlite3DbMallocRaw(tls, (*TStrAccum)(unsafe.Pointer(p)).Fdb, uint64((*TStrAccum)(unsafe.Pointer(p)).FnChar+uint32(1))) + zText = _sqlite3DbMallocRaw(tls, (*TStrAccum)(unsafe.Pointer(p)).Fdb, uint64(1)+uint64((*TStrAccum)(unsafe.Pointer(p)).FnChar)) if zText != 0 { libc.Xmemcpy(tls, zText, (*TStrAccum)(unsafe.Pointer(p)).FzText, uint64((*TStrAccum)(unsafe.Pointer(p)).FnChar+uint32(1))) p1 = p + 29 @@ -19541,6 +19663,8 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va return zBuf } +/* Maximum size of an sqlite3_log() message. */ + // C documentation // // /* @@ -19558,11 +19682,11 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // ** memory mutex is held do not use these mechanisms. // */ func _renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Tva_list) { - bp := tls.Alloc(256) - defer tls.Free(256) + bp := tls.Alloc(736) + defer tls.Free(736) var _ /* acc at bp+0 */ TStrAccum - var _ /* zMsg at bp+32 */ [210]int8 /* Complete log message */ - _sqlite3StrAccumInit(tls, bp, uintptr(0), bp+32, int32(210), 0) + var _ /* zMsg at bp+32 */ [700]int8 /* Complete log message */ + _sqlite3StrAccumInit(tls, bp, uintptr(0), bp+32, int32(700), 0) Xsqlite3_str_vappendf(tls, bp, zFormat, ap) (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{_sqlite3Config.FxLog})))(tls, _sqlite3Config.FpLogArg, iErrCode, _sqlite3StrAccumFinish(tls, bp)) } @@ -20199,6 +20323,37 @@ var _sqlite3Utf8Trans1 = [64]uint8{ // C documentation // // /* +// ** Write a single UTF8 character whose value is v into the +// ** buffer starting at zOut. zOut must be sized to hold at +// ** least four bytes. Return the number of bytes needed +// ** to encode the new character. +// */ +func _sqlite3AppendOneUtf8Character(tls *libc.TLS, zOut uintptr, v Tu32) (r int32) { + if v < uint32(0x00080) { + *(*int8)(unsafe.Pointer(zOut)) = libc.Int8FromUint8(uint8(v & libc.Uint32FromInt32(0xff))) + return int32(1) + } + if v < uint32(0x00800) { + *(*int8)(unsafe.Pointer(zOut)) = int8(int32(0xc0) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x1f)))) + *(*int8)(unsafe.Pointer(zOut + 1)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v&libc.Uint32FromInt32(0x3f)))) + return int32(2) + } + if v < uint32(0x10000) { + *(*int8)(unsafe.Pointer(zOut)) = int8(int32(0xe0) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x0f)))) + *(*int8)(unsafe.Pointer(zOut + 1)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f)))) + *(*int8)(unsafe.Pointer(zOut + 2)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v&libc.Uint32FromInt32(0x3f)))) + return int32(3) + } + *(*int8)(unsafe.Pointer(zOut)) = int8(int32(0xf0) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(18)&libc.Uint32FromInt32(0x07)))) + *(*int8)(unsafe.Pointer(zOut + 1)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x3f)))) + *(*int8)(unsafe.Pointer(zOut + 2)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f)))) + *(*int8)(unsafe.Pointer(zOut + 3)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v&libc.Uint32FromInt32(0x3f)))) + return int32(4) +} + +// C documentation +// +// /* // ** Translate a single UTF-8 character. Return the unicode value. // ** // ** During translation, assume that the byte that zTerm points @@ -20946,7 +21101,7 @@ func _sqlite3ProgressCheck(tls *libc.TLS, p uintptr) { if (*TParse)(unsafe.Pointer(p)).Frc == int32(SQLITE_INTERRUPT) { (*TParse)(unsafe.Pointer(p)).FnProgressSteps = uint32(0) } else { - v2 = p + 152 + v2 = p + 136 *(*Tu32)(unsafe.Pointer(v2))++ v1 = *(*Tu32)(unsafe.Pointer(v2)) if v1 >= (*Tsqlite3)(unsafe.Pointer(db)).FnProgressOps { @@ -21121,7 +21276,7 @@ func _sqlite3DequoteNumber(tls *libc.TLS, pParse uintptr, p uintptr) { } } else { if bHex == 0 && (!(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + uintptr(-libc.Int32FromInt32(1)))))])&libc.Int32FromInt32(0x04) != 0) || !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + 1)))])&libc.Int32FromInt32(0x04) != 0)) || bHex == int32(1) && (!(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + uintptr(-libc.Int32FromInt32(1)))))])&libc.Int32FromInt32(0x08) != 0) || !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + 1)))])&libc.Int32FromInt32(0x08) != 0)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+1725, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(p + 8)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+1751, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(p + 8)))) } } goto _2 @@ -21663,7 +21818,7 @@ func _compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) (r int32) { _, _, _ = c, i, pow63 c = 0 /* 012345678901234567 */ - pow63 = __ccgo_ts + 1750 + pow63 = __ccgo_ts + 1776 i = 0 for { if !(c == 0 && i < int32(18)) { @@ -21890,7 +22045,7 @@ func _sqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) (r int32) { } return 0 } else { - n = libc.Int32FromUint64(libc.Uint64FromInt32(0x3fffffff) & libc.Xstrspn(tls, z, __ccgo_ts+1769)) + n = libc.Int32FromUint64(libc.Uint64FromInt32(0x3fffffff) & libc.Xstrspn(tls, z, __ccgo_ts+1795)) if *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 { n++ } @@ -22050,7 +22205,7 @@ func _sqlite3FpDecode(tls *libc.TLS, p uintptr, _r float64, iRound int32, mxRoun (*TFpDecode)(unsafe.Pointer(p)).Fsign = int8('+') (*TFpDecode)(unsafe.Pointer(p)).Fn = int32(1) (*TFpDecode)(unsafe.Pointer(p)).FiDP = int32(1) - (*TFpDecode)(unsafe.Pointer(p)).Fz = __ccgo_ts + 1785 + (*TFpDecode)(unsafe.Pointer(p)).Fz = __ccgo_ts + 1811 return } else { (*TFpDecode)(unsafe.Pointer(p)).Fsign = int8('+') @@ -22159,7 +22314,7 @@ func _sqlite3FpDecode(tls *libc.TLS, p uintptr, _r float64, iRound int32, mxRoun } } (*TFpDecode)(unsafe.Pointer(p)).Fz = p + 24 + uintptr(i+int32(1)) - for (*TFpDecode)(unsafe.Pointer(p)).Fn > 0 && int32(*(*int8)(unsafe.Pointer((*TFpDecode)(unsafe.Pointer(p)).Fz + uintptr((*TFpDecode)(unsafe.Pointer(p)).Fn-int32(1))))) == int32('0') { + for int32(*(*int8)(unsafe.Pointer((*TFpDecode)(unsafe.Pointer(p)).Fz + uintptr((*TFpDecode)(unsafe.Pointer(p)).Fn-int32(1))))) == int32('0') { (*TFpDecode)(unsafe.Pointer(p)).Fn-- } } @@ -22570,7 +22725,7 @@ func _sqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) (r uintptr func _logBadConnection(tls *libc.TLS, zType uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+1787, libc.VaList(bp+8, zType)) + Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+1813, libc.VaList(bp+8, zType)) } // C documentation @@ -22599,7 +22754,7 @@ func _sqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) (r int32) { eOpenState = (*Tsqlite3)(unsafe.Pointer(db)).FeOpenState if libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_OPEN) { if _sqlite3SafetyCheckSickOrOk(tls, db) != 0 { - _logBadConnection(tls, __ccgo_ts+1832) + _logBadConnection(tls, __ccgo_ts+1858) } return 0 } else { @@ -22613,7 +22768,7 @@ func _sqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) (r int32) { _ = eOpenState eOpenState = (*Tsqlite3)(unsafe.Pointer(db)).FeOpenState if libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_SICK) && libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_OPEN) && libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_BUSY) { - _logBadConnection(tls, __ccgo_ts+1841) + _logBadConnection(tls, __ccgo_ts+1867) return 0 } else { return int32(1) @@ -22698,7 +22853,7 @@ func _sqlite3MulInt64(tls *libc.TLS, pA uintptr, iB Ti64) (r int32) { // C documentation // // /* -// ** Compute the absolute value of a 32-bit signed integer, of possible. Or +// ** Compute the absolute value of a 32-bit signed integer, if possible. Or // ** if the integer has a value of -2147483648, return +2147483647 // */ func _sqlite3AbsInt32(tls *libc.TLS, x int32) (r int32) { @@ -23053,23 +23208,21 @@ func _sqlite3HashClear(tls *libc.TLS, pH uintptr) { // ** The hashing function. // */ func _strHash(tls *libc.TLS, z uintptr) (r uint32) { - var c, v1 uint8 var h uint32 - var v2 uintptr - _, _, _, _ = c, h, v1, v2 + var v1 uintptr + _, _ = h, v1 h = uint32(0) - for { - v2 = z - z++ - v1 = libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(v2))) - c = v1 - if !(libc.Int32FromUint8(v1) != 0) { - break - } /*OPTIMIZATION-IF-TRUE*/ + for *(*int8)(unsafe.Pointer(z)) != 0 { /*OPTIMIZATION-IF-TRUE*/ /* Knuth multiplicative hashing. (Sorting & Searching, p. 510). ** 0x9e3779b1 is 2654435761 which is the closest prime number to - ** (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2. */ - h += uint32(_sqlite3UpperToLower[c]) + ** (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2. + ** + ** Only bits 0xdf for ASCII and bits 0xbf for EBCDIC each octet are + ** hashed since the omitted bits determine the upper/lower case difference. + */ + v1 = z + z++ + h += libc.Uint32FromInt32(int32(0xdf) & libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(v1))))) h *= uint32(0x9e3779b1) } return h @@ -23124,8 +23277,8 @@ func _insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { // */ func _rehash(tls *libc.TLS, pH uintptr, new_size uint32) (r int32) { var elem, new_ht, next_elem uintptr - var h, v1 uint32 - _, _, _, _, _ = elem, h, new_ht, next_elem, v1 /* For looping over existing elements */ + var v1 uint32 + _, _, _, _ = elem, new_ht, next_elem, v1 /* For looping over existing elements */ if uint64(new_size)*uint64(16) > uint64(SQLITE_MALLOC_SOFT_LIMIT) { new_size = uint32(libc.Uint64FromInt32(SQLITE_MALLOC_SOFT_LIMIT) / libc.Uint64FromInt64(16)) } @@ -23158,9 +23311,8 @@ func _rehash(tls *libc.TLS, pH uintptr, new_size uint32) (r int32) { if !(elem != 0) { break } - h = _strHash(tls, (*THashElem)(unsafe.Pointer(elem)).FpKey) % new_size next_elem = (*THashElem)(unsafe.Pointer(elem)).Fnext - _insertElement(tls, pH, new_ht+uintptr(h)*16, elem) + _insertElement(tls, pH, new_ht+uintptr((*THashElem)(unsafe.Pointer(elem)).Fh%new_size)*16, elem) goto _2 _2: ; @@ -23180,13 +23332,12 @@ func _findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr var count, h uint32 var elem, pEntry uintptr _, _, _, _ = count, elem, h, pEntry /* The computed hash */ + h = _strHash(tls, pKey) if (*THash)(unsafe.Pointer(pH)).Fht != 0 { - h = _strHash(tls, pKey) % (*THash)(unsafe.Pointer(pH)).Fhtsize - pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(h)*16 + pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(h%(*THash)(unsafe.Pointer(pH)).Fhtsize)*16 elem = (*T_ht)(unsafe.Pointer(pEntry)).Fchain count = (*T_ht)(unsafe.Pointer(pEntry)).Fcount } else { - h = uint32(0) elem = (*THash)(unsafe.Pointer(pH)).Ffirst count = (*THash)(unsafe.Pointer(pH)).Fcount } @@ -23194,7 +23345,7 @@ func _findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr *(*uint32)(unsafe.Pointer(pHash)) = h } for count != 0 { - if _sqlite3StrICmp(tls, (*THashElem)(unsafe.Pointer(elem)).FpKey, pKey) == 0 { + if h == (*THashElem)(unsafe.Pointer(elem)).Fh && _sqlite3StrICmp(tls, (*THashElem)(unsafe.Pointer(elem)).FpKey, pKey) == 0 { return elem } elem = (*THashElem)(unsafe.Pointer(elem)).Fnext @@ -23210,7 +23361,7 @@ var _nullElement = THashElem{} // /* Remove a single entry from the hash table given a pointer to that // ** element and a hash on the element's key. // */ -func _removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { +func _removeElement(tls *libc.TLS, pH uintptr, elem uintptr) { var pEntry uintptr _ = pEntry if (*THashElem)(unsafe.Pointer(elem)).Fprev != 0 { @@ -23222,7 +23373,7 @@ func _removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) (*THashElem)(unsafe.Pointer((*THashElem)(unsafe.Pointer(elem)).Fnext)).Fprev = (*THashElem)(unsafe.Pointer(elem)).Fprev } if (*THash)(unsafe.Pointer(pH)).Fht != 0 { - pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(h)*16 + pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr((*THashElem)(unsafe.Pointer(elem)).Fh%(*THash)(unsafe.Pointer(pH)).Fhtsize)*16 if (*T_ht)(unsafe.Pointer(pEntry)).Fchain == elem { (*T_ht)(unsafe.Pointer(pEntry)).Fchain = (*THashElem)(unsafe.Pointer(elem)).Fnext } @@ -23271,7 +23422,7 @@ func _sqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) ( if (*THashElem)(unsafe.Pointer(elem)).Fdata != 0 { old_data = (*THashElem)(unsafe.Pointer(elem)).Fdata if data == uintptr(0) { - _removeElementGivenHash(tls, pH, elem, *(*uint32)(unsafe.Pointer(bp))) + _removeElement(tls, pH, elem) } else { (*THashElem)(unsafe.Pointer(elem)).Fdata = data (*THashElem)(unsafe.Pointer(elem)).FpKey = pKey @@ -23281,20 +23432,19 @@ func _sqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) ( if data == uintptr(0) { return uintptr(0) } - new_elem = _sqlite3Malloc(tls, uint64(32)) + new_elem = _sqlite3Malloc(tls, uint64(40)) if new_elem == uintptr(0) { return data } (*THashElem)(unsafe.Pointer(new_elem)).FpKey = pKey + (*THashElem)(unsafe.Pointer(new_elem)).Fh = *(*uint32)(unsafe.Pointer(bp)) (*THashElem)(unsafe.Pointer(new_elem)).Fdata = data (*THash)(unsafe.Pointer(pH)).Fcount++ - if (*THash)(unsafe.Pointer(pH)).Fcount >= uint32(10) && (*THash)(unsafe.Pointer(pH)).Fcount > uint32(2)*(*THash)(unsafe.Pointer(pH)).Fhtsize { - if _rehash(tls, pH, (*THash)(unsafe.Pointer(pH)).Fcount*uint32(2)) != 0 { - *(*uint32)(unsafe.Pointer(bp)) = _strHash(tls, pKey) % (*THash)(unsafe.Pointer(pH)).Fhtsize - } + if (*THash)(unsafe.Pointer(pH)).Fcount >= uint32(5) && (*THash)(unsafe.Pointer(pH)).Fcount > uint32(2)*(*THash)(unsafe.Pointer(pH)).Fhtsize { + _rehash(tls, pH, (*THash)(unsafe.Pointer(pH)).Fcount*uint32(3)) } if (*THash)(unsafe.Pointer(pH)).Fht != 0 { - v1 = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(*(*uint32)(unsafe.Pointer(bp)))*16 + v1 = (*THash)(unsafe.Pointer(pH)).Fht + uintptr((*THashElem)(unsafe.Pointer(new_elem)).Fh%(*THash)(unsafe.Pointer(pH)).Fhtsize)*16 } else { v1 = uintptr(0) } @@ -23313,196 +23463,196 @@ func _sqlite3OpcodeName(tls *libc.TLS, i int32) (r uintptr) { } var _azName = [190]uintptr{ - 0: __ccgo_ts + 1849, - 1: __ccgo_ts + 1859, - 2: __ccgo_ts + 1870, - 3: __ccgo_ts + 1882, - 4: __ccgo_ts + 1893, - 5: __ccgo_ts + 1905, - 6: __ccgo_ts + 1912, - 7: __ccgo_ts + 1920, - 8: __ccgo_ts + 1928, - 9: __ccgo_ts + 1933, - 10: __ccgo_ts + 1938, - 11: __ccgo_ts + 1944, - 12: __ccgo_ts + 1958, - 13: __ccgo_ts + 1964, - 14: __ccgo_ts + 1974, - 15: __ccgo_ts + 1979, - 16: __ccgo_ts + 1984, - 17: __ccgo_ts + 1987, - 18: __ccgo_ts + 1993, - 19: __ccgo_ts + 2000, - 20: __ccgo_ts + 2004, - 21: __ccgo_ts + 2014, - 22: __ccgo_ts + 2021, - 23: __ccgo_ts + 2028, - 24: __ccgo_ts + 2035, - 25: __ccgo_ts + 2042, - 26: __ccgo_ts + 2052, - 27: __ccgo_ts + 2061, - 28: __ccgo_ts + 2072, - 29: __ccgo_ts + 2081, - 30: __ccgo_ts + 2087, - 31: __ccgo_ts + 2097, - 32: __ccgo_ts + 2107, - 33: __ccgo_ts + 2112, - 34: __ccgo_ts + 2126, - 35: __ccgo_ts + 2137, - 36: __ccgo_ts + 2142, - 37: __ccgo_ts + 2149, - 38: __ccgo_ts + 2160, - 39: __ccgo_ts + 2165, - 40: __ccgo_ts + 2170, - 41: __ccgo_ts + 2176, - 42: __ccgo_ts + 2182, - 43: __ccgo_ts + 2188, - 44: __ccgo_ts + 2191, - 45: __ccgo_ts + 2195, - 46: __ccgo_ts + 2201, - 47: __ccgo_ts + 2212, - 48: __ccgo_ts + 2223, - 49: __ccgo_ts + 2231, - 50: __ccgo_ts + 2240, - 51: __ccgo_ts + 2246, - 52: __ccgo_ts + 2253, - 53: __ccgo_ts + 2261, - 54: __ccgo_ts + 2264, - 55: __ccgo_ts + 2267, - 56: __ccgo_ts + 2270, - 57: __ccgo_ts + 2273, - 58: __ccgo_ts + 2276, - 59: __ccgo_ts + 2279, - 60: __ccgo_ts + 2286, - 61: __ccgo_ts + 2296, - 62: __ccgo_ts + 2309, - 63: __ccgo_ts + 2320, - 64: __ccgo_ts + 2326, - 65: __ccgo_ts + 2333, - 66: __ccgo_ts + 2342, - 67: __ccgo_ts + 2351, - 68: __ccgo_ts + 2358, - 69: __ccgo_ts + 2371, - 70: __ccgo_ts + 2382, - 71: __ccgo_ts + 2387, - 72: __ccgo_ts + 2395, - 73: __ccgo_ts + 2401, - 74: __ccgo_ts + 2408, - 75: __ccgo_ts + 2420, - 76: __ccgo_ts + 2425, - 77: __ccgo_ts + 2434, - 78: __ccgo_ts + 2439, - 79: __ccgo_ts + 2448, - 80: __ccgo_ts + 2453, - 81: __ccgo_ts + 2458, - 82: __ccgo_ts + 2464, - 83: __ccgo_ts + 2472, - 84: __ccgo_ts + 2480, - 85: __ccgo_ts + 2490, - 86: __ccgo_ts + 2498, - 87: __ccgo_ts + 2505, - 88: __ccgo_ts + 2518, - 89: __ccgo_ts + 2523, - 90: __ccgo_ts + 2535, - 91: __ccgo_ts + 2543, - 92: __ccgo_ts + 2550, - 93: __ccgo_ts + 2561, - 94: __ccgo_ts + 2568, - 95: __ccgo_ts + 2575, - 96: __ccgo_ts + 2585, - 97: __ccgo_ts + 2594, - 98: __ccgo_ts + 2605, - 99: __ccgo_ts + 2611, - 100: __ccgo_ts + 2622, - 101: __ccgo_ts + 2632, - 102: __ccgo_ts + 2642, - 103: __ccgo_ts + 2651, - 104: __ccgo_ts + 2658, - 105: __ccgo_ts + 2664, - 106: __ccgo_ts + 2674, - 107: __ccgo_ts + 2685, - 108: __ccgo_ts + 2689, - 109: __ccgo_ts + 2698, - 110: __ccgo_ts + 2707, - 111: __ccgo_ts + 2714, - 112: __ccgo_ts + 2724, - 113: __ccgo_ts + 2731, - 114: __ccgo_ts + 2741, - 115: __ccgo_ts + 2749, - 116: __ccgo_ts + 2756, - 117: __ccgo_ts + 2770, - 118: __ccgo_ts + 2784, - 119: __ccgo_ts + 2792, - 120: __ccgo_ts + 2803, - 121: __ccgo_ts + 2816, - 122: __ccgo_ts + 2827, - 123: __ccgo_ts + 2833, - 124: __ccgo_ts + 2845, - 125: __ccgo_ts + 2854, - 126: __ccgo_ts + 2862, - 127: __ccgo_ts + 2871, - 128: __ccgo_ts + 2880, - 129: __ccgo_ts + 2887, - 130: __ccgo_ts + 2895, - 131: __ccgo_ts + 2902, - 132: __ccgo_ts + 2913, - 133: __ccgo_ts + 2927, - 134: __ccgo_ts + 2938, - 135: __ccgo_ts + 2946, - 136: __ccgo_ts + 2952, - 137: __ccgo_ts + 2960, - 138: __ccgo_ts + 2968, - 139: __ccgo_ts + 2978, - 140: __ccgo_ts + 2991, - 141: __ccgo_ts + 3001, - 142: __ccgo_ts + 3014, - 143: __ccgo_ts + 3023, - 144: __ccgo_ts + 3034, - 145: __ccgo_ts + 3042, - 146: __ccgo_ts + 3048, - 147: __ccgo_ts + 3060, - 148: __ccgo_ts + 3072, - 149: __ccgo_ts + 3080, - 150: __ccgo_ts + 3092, - 151: __ccgo_ts + 3105, - 152: __ccgo_ts + 3115, - 153: __ccgo_ts + 3125, - 154: __ccgo_ts + 3137, - 155: __ccgo_ts + 3142, - 156: __ccgo_ts + 3154, - 157: __ccgo_ts + 3164, - 158: __ccgo_ts + 3170, - 159: __ccgo_ts + 3180, - 160: __ccgo_ts + 3187, - 161: __ccgo_ts + 3199, - 162: __ccgo_ts + 3210, - 163: __ccgo_ts + 3218, - 164: __ccgo_ts + 3227, - 165: __ccgo_ts + 3236, - 166: __ccgo_ts + 3245, - 167: __ccgo_ts + 3252, - 168: __ccgo_ts + 3263, - 169: __ccgo_ts + 3276, - 170: __ccgo_ts + 3286, - 171: __ccgo_ts + 3293, - 172: __ccgo_ts + 3301, - 173: __ccgo_ts + 3310, - 174: __ccgo_ts + 3316, - 175: __ccgo_ts + 3323, - 176: __ccgo_ts + 3331, - 177: __ccgo_ts + 3339, - 178: __ccgo_ts + 3347, - 179: __ccgo_ts + 3357, - 180: __ccgo_ts + 3366, - 181: __ccgo_ts + 3377, - 182: __ccgo_ts + 3388, - 183: __ccgo_ts + 3399, - 184: __ccgo_ts + 3409, - 185: __ccgo_ts + 3415, - 186: __ccgo_ts + 3426, - 187: __ccgo_ts + 3437, - 188: __ccgo_ts + 3442, - 189: __ccgo_ts + 3450, + 0: __ccgo_ts + 1875, + 1: __ccgo_ts + 1885, + 2: __ccgo_ts + 1896, + 3: __ccgo_ts + 1908, + 4: __ccgo_ts + 1919, + 5: __ccgo_ts + 1931, + 6: __ccgo_ts + 1938, + 7: __ccgo_ts + 1946, + 8: __ccgo_ts + 1954, + 9: __ccgo_ts + 1959, + 10: __ccgo_ts + 1964, + 11: __ccgo_ts + 1970, + 12: __ccgo_ts + 1984, + 13: __ccgo_ts + 1990, + 14: __ccgo_ts + 2000, + 15: __ccgo_ts + 2005, + 16: __ccgo_ts + 2010, + 17: __ccgo_ts + 2013, + 18: __ccgo_ts + 2019, + 19: __ccgo_ts + 2026, + 20: __ccgo_ts + 2030, + 21: __ccgo_ts + 2040, + 22: __ccgo_ts + 2047, + 23: __ccgo_ts + 2054, + 24: __ccgo_ts + 2061, + 25: __ccgo_ts + 2068, + 26: __ccgo_ts + 2078, + 27: __ccgo_ts + 2087, + 28: __ccgo_ts + 2098, + 29: __ccgo_ts + 2107, + 30: __ccgo_ts + 2113, + 31: __ccgo_ts + 2123, + 32: __ccgo_ts + 2133, + 33: __ccgo_ts + 2138, + 34: __ccgo_ts + 2152, + 35: __ccgo_ts + 2163, + 36: __ccgo_ts + 2168, + 37: __ccgo_ts + 2175, + 38: __ccgo_ts + 2186, + 39: __ccgo_ts + 2191, + 40: __ccgo_ts + 2196, + 41: __ccgo_ts + 2202, + 42: __ccgo_ts + 2208, + 43: __ccgo_ts + 2214, + 44: __ccgo_ts + 2217, + 45: __ccgo_ts + 2221, + 46: __ccgo_ts + 2227, + 47: __ccgo_ts + 2238, + 48: __ccgo_ts + 2249, + 49: __ccgo_ts + 2257, + 50: __ccgo_ts + 2266, + 51: __ccgo_ts + 2272, + 52: __ccgo_ts + 2279, + 53: __ccgo_ts + 2287, + 54: __ccgo_ts + 2290, + 55: __ccgo_ts + 2293, + 56: __ccgo_ts + 2296, + 57: __ccgo_ts + 2299, + 58: __ccgo_ts + 2302, + 59: __ccgo_ts + 2305, + 60: __ccgo_ts + 2312, + 61: __ccgo_ts + 2322, + 62: __ccgo_ts + 2335, + 63: __ccgo_ts + 2346, + 64: __ccgo_ts + 2352, + 65: __ccgo_ts + 2359, + 66: __ccgo_ts + 2368, + 67: __ccgo_ts + 2377, + 68: __ccgo_ts + 2384, + 69: __ccgo_ts + 2397, + 70: __ccgo_ts + 2408, + 71: __ccgo_ts + 2413, + 72: __ccgo_ts + 2421, + 73: __ccgo_ts + 2427, + 74: __ccgo_ts + 2434, + 75: __ccgo_ts + 2446, + 76: __ccgo_ts + 2451, + 77: __ccgo_ts + 2460, + 78: __ccgo_ts + 2465, + 79: __ccgo_ts + 2474, + 80: __ccgo_ts + 2479, + 81: __ccgo_ts + 2484, + 82: __ccgo_ts + 2490, + 83: __ccgo_ts + 2498, + 84: __ccgo_ts + 2506, + 85: __ccgo_ts + 2516, + 86: __ccgo_ts + 2524, + 87: __ccgo_ts + 2531, + 88: __ccgo_ts + 2544, + 89: __ccgo_ts + 2549, + 90: __ccgo_ts + 2561, + 91: __ccgo_ts + 2569, + 92: __ccgo_ts + 2576, + 93: __ccgo_ts + 2587, + 94: __ccgo_ts + 2594, + 95: __ccgo_ts + 2601, + 96: __ccgo_ts + 2611, + 97: __ccgo_ts + 2620, + 98: __ccgo_ts + 2631, + 99: __ccgo_ts + 2637, + 100: __ccgo_ts + 2648, + 101: __ccgo_ts + 2658, + 102: __ccgo_ts + 2668, + 103: __ccgo_ts + 2677, + 104: __ccgo_ts + 2684, + 105: __ccgo_ts + 2690, + 106: __ccgo_ts + 2700, + 107: __ccgo_ts + 2711, + 108: __ccgo_ts + 2715, + 109: __ccgo_ts + 2724, + 110: __ccgo_ts + 2733, + 111: __ccgo_ts + 2740, + 112: __ccgo_ts + 2750, + 113: __ccgo_ts + 2757, + 114: __ccgo_ts + 2767, + 115: __ccgo_ts + 2775, + 116: __ccgo_ts + 2782, + 117: __ccgo_ts + 2796, + 118: __ccgo_ts + 2810, + 119: __ccgo_ts + 2818, + 120: __ccgo_ts + 2829, + 121: __ccgo_ts + 2842, + 122: __ccgo_ts + 2853, + 123: __ccgo_ts + 2859, + 124: __ccgo_ts + 2871, + 125: __ccgo_ts + 2880, + 126: __ccgo_ts + 2888, + 127: __ccgo_ts + 2897, + 128: __ccgo_ts + 2906, + 129: __ccgo_ts + 2913, + 130: __ccgo_ts + 2921, + 131: __ccgo_ts + 2928, + 132: __ccgo_ts + 2939, + 133: __ccgo_ts + 2953, + 134: __ccgo_ts + 2964, + 135: __ccgo_ts + 2972, + 136: __ccgo_ts + 2978, + 137: __ccgo_ts + 2986, + 138: __ccgo_ts + 2994, + 139: __ccgo_ts + 3004, + 140: __ccgo_ts + 3017, + 141: __ccgo_ts + 3027, + 142: __ccgo_ts + 3040, + 143: __ccgo_ts + 3049, + 144: __ccgo_ts + 3060, + 145: __ccgo_ts + 3068, + 146: __ccgo_ts + 3074, + 147: __ccgo_ts + 3086, + 148: __ccgo_ts + 3098, + 149: __ccgo_ts + 3106, + 150: __ccgo_ts + 3118, + 151: __ccgo_ts + 3131, + 152: __ccgo_ts + 3141, + 153: __ccgo_ts + 3151, + 154: __ccgo_ts + 3163, + 155: __ccgo_ts + 3168, + 156: __ccgo_ts + 3180, + 157: __ccgo_ts + 3190, + 158: __ccgo_ts + 3196, + 159: __ccgo_ts + 3206, + 160: __ccgo_ts + 3213, + 161: __ccgo_ts + 3225, + 162: __ccgo_ts + 3236, + 163: __ccgo_ts + 3244, + 164: __ccgo_ts + 3253, + 165: __ccgo_ts + 3262, + 166: __ccgo_ts + 3271, + 167: __ccgo_ts + 3278, + 168: __ccgo_ts + 3289, + 169: __ccgo_ts + 3302, + 170: __ccgo_ts + 3312, + 171: __ccgo_ts + 3319, + 172: __ccgo_ts + 3327, + 173: __ccgo_ts + 3336, + 174: __ccgo_ts + 3342, + 175: __ccgo_ts + 3349, + 176: __ccgo_ts + 3357, + 177: __ccgo_ts + 3365, + 178: __ccgo_ts + 3373, + 179: __ccgo_ts + 3383, + 180: __ccgo_ts + 3392, + 181: __ccgo_ts + 3403, + 182: __ccgo_ts + 3414, + 183: __ccgo_ts + 3425, + 184: __ccgo_ts + 3435, + 185: __ccgo_ts + 3441, + 186: __ccgo_ts + 3452, + 187: __ccgo_ts + 3463, + 188: __ccgo_ts + 3468, + 189: __ccgo_ts + 3476, } type Tpthread_once = struct { @@ -24258,91 +24408,91 @@ type unix_syscall = Tunix_syscall // */ var _aSyscall = [29]Tunix_syscall{ 0: { - FzName: __ccgo_ts + 3460, + FzName: __ccgo_ts + 3486, }, 1: { - FzName: __ccgo_ts + 3465, + FzName: __ccgo_ts + 3491, }, 2: { - FzName: __ccgo_ts + 3471, + FzName: __ccgo_ts + 3497, }, 3: { - FzName: __ccgo_ts + 3478, + FzName: __ccgo_ts + 3504, }, 4: { - FzName: __ccgo_ts + 3485, + FzName: __ccgo_ts + 3511, }, 5: { - FzName: __ccgo_ts + 3490, + FzName: __ccgo_ts + 3516, }, 6: { - FzName: __ccgo_ts + 3496, + FzName: __ccgo_ts + 3522, }, 7: { - FzName: __ccgo_ts + 3506, + FzName: __ccgo_ts + 3532, }, 8: { - FzName: __ccgo_ts + 3512, + FzName: __ccgo_ts + 3538, }, 9: { - FzName: __ccgo_ts + 3517, + FzName: __ccgo_ts + 3543, }, 10: { - FzName: __ccgo_ts + 3523, + FzName: __ccgo_ts + 3549, }, 11: { - FzName: __ccgo_ts + 3531, + FzName: __ccgo_ts + 3557, }, 12: { - FzName: __ccgo_ts + 3537, + FzName: __ccgo_ts + 3563, }, 13: { - FzName: __ccgo_ts + 3544, + FzName: __ccgo_ts + 3570, }, 14: { - FzName: __ccgo_ts + 3553, + FzName: __ccgo_ts + 3579, }, 15: { - FzName: __ccgo_ts + 3560, + FzName: __ccgo_ts + 3586, }, 16: { - FzName: __ccgo_ts + 3570, + FzName: __ccgo_ts + 3596, }, 17: { - FzName: __ccgo_ts + 3577, + FzName: __ccgo_ts + 3603, }, 18: { - FzName: __ccgo_ts + 3591, + FzName: __ccgo_ts + 3617, }, 19: { - FzName: __ccgo_ts + 3597, + FzName: __ccgo_ts + 3623, }, 20: { - FzName: __ccgo_ts + 3603, + FzName: __ccgo_ts + 3629, }, 21: { - FzName: __ccgo_ts + 3610, + FzName: __ccgo_ts + 3636, }, 22: { - FzName: __ccgo_ts + 3618, + FzName: __ccgo_ts + 3644, }, 23: { - FzName: __ccgo_ts + 3623, + FzName: __ccgo_ts + 3649, }, 24: { - FzName: __ccgo_ts + 3630, + FzName: __ccgo_ts + 3656, }, 25: { - FzName: __ccgo_ts + 3637, + FzName: __ccgo_ts + 3663, }, 26: { - FzName: __ccgo_ts + 3649, + FzName: __ccgo_ts + 3675, }, 27: { - FzName: __ccgo_ts + 3658, + FzName: __ccgo_ts + 3684, }, 28: { - FzName: __ccgo_ts + 3664, + FzName: __ccgo_ts + 3690, }, } @@ -24577,9 +24727,9 @@ func _robust_open(tls *libc.TLS, z uintptr, f int32, m Tmode_t) (r int32) { (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(16)].FpCurrent})))(tls, z) } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(1)].FpCurrent})))(tls, fd) - Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3670, libc.VaList(bp+232, z, fd)) + Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3696, libc.VaList(bp+232, z, fd)) fd = -int32(1) - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[0].FpCurrent})))(tls, __ccgo_ts+3713, O_RDONLY, libc.Int32FromUint16(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[0].FpCurrent})))(tls, __ccgo_ts+3739, O_RDONLY, libc.Int32FromUint16(m)) < 0 { break } } @@ -24899,7 +25049,7 @@ func _unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uint if zPath == uintptr(0) { zPath = __ccgo_ts + 1665 } - Xsqlite3_log(tls, errcode, __ccgo_ts+3723, libc.VaList(bp+8, iLine, iErrno, zFunc, zPath, zErr)) + Xsqlite3_log(tls, errcode, __ccgo_ts+3749, libc.VaList(bp+8, iLine, iErrno, zFunc, zPath, zErr)) return errcode } @@ -24927,7 +25077,7 @@ func _robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { } else { v1 = uintptr(0) } - _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(16)<<libc.Int32FromInt32(8), __ccgo_ts+3465, v1, lineno) + _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(16)<<libc.Int32FromInt32(8), __ccgo_ts+3491, v1, lineno) } } @@ -24956,7 +25106,7 @@ func _closePendingFds(tls *libc.TLS, pFile uintptr) { break } pNext = (*TUnixUnusedFd)(unsafe.Pointer(p)).FpNext - _robust_close(tls, pFile, (*TUnixUnusedFd)(unsafe.Pointer(p)).Ffd, int32(39960)) + _robust_close(tls, pFile, (*TUnixUnusedFd)(unsafe.Pointer(p)).Ffd, int32(40204)) Xsqlite3_free(tls, p) goto _1 _1: @@ -25097,19 +25247,19 @@ func _verifyDbFile(tls *libc.TLS, pFile uintptr) { } rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(5)].FpCurrent})))(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, bp) if rc != 0 { - Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3754, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3780, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink == uint64(0) { - Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3778, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3804, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink > uint64(1) { - Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3807, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3833, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) return } if _fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3834, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3860, libc.VaList(bp+232, (*TunixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -25586,7 +25736,7 @@ func _closeUnixFile(tls *libc.TLS, id uintptr) (r int32) { pFile = id _unixUnmapfile(tls, pFile) if (*TunixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - _robust_close(tls, pFile, (*TunixFile)(unsafe.Pointer(pFile)).Fh, int32(40744)) + _robust_close(tls, pFile, (*TunixFile)(unsafe.Pointer(pFile)).Fh, int32(40995)) (*TunixFile)(unsafe.Pointer(pFile)).Fh = -int32(1) } Xsqlite3_free(tls, (*TunixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused) @@ -26203,7 +26353,7 @@ func _openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) (r int32) { var _ /* zDirname at bp+0 */ [513]int8 _, _ = fd, ii fd = -int32(1) - Xsqlite3_snprintf(tls, int32(MAX_PATHNAME), bp, __ccgo_ts+3862, libc.VaList(bp+528, zFilename)) + Xsqlite3_snprintf(tls, int32(MAX_PATHNAME), bp, __ccgo_ts+3888, libc.VaList(bp+528, zFilename)) ii = libc.Int32FromUint64(libc.Xstrlen(tls, bp)) for { if !(ii > 0 && int32((*(*[513]int8)(unsafe.Pointer(bp)))[ii]) != int32('/')) { @@ -26229,7 +26379,7 @@ func _openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) (r int32) { if fd >= 0 { return SQLITE_OK } - return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(42325)), __ccgo_ts+3577, bp, int32(42325)) + return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(42576)), __ccgo_ts+3603, bp, int32(42576)) } // C documentation @@ -26266,7 +26416,7 @@ func _unixSync(tls *libc.TLS, id uintptr, flags int32) (r int32) { rc = _full_fsync(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly) if rc != 0 { _storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(4)<<libc.Int32FromInt32(8), __ccgo_ts+3865, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42366)) + return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(4)<<libc.Int32FromInt32(8), __ccgo_ts+3891, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42617)) } /* Also fsync the directory containing the file if the DIRSYNC flag ** is set. This is a one-time occurrence. Many systems (examples: AIX) @@ -26276,7 +26426,7 @@ func _unixSync(tls *libc.TLS, id uintptr, flags int32) (r int32) { rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(17)].FpCurrent})))(tls, (*TunixFile)(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)), int32(42380)) + _robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), int32(42631)) } else { rc = SQLITE_OK } @@ -26307,7 +26457,7 @@ func _unixTruncate(tls *libc.TLS, id uintptr, nByte Ti64) (r int32) { rc = _robust_ftruncate(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { _storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3496, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42411)) + return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3522, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42662)) } else { /* If the file was just truncated to a size smaller than the currently ** mapped region, reduce the effective mapping size as well. SQLite will @@ -26403,7 +26553,7 @@ func _fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte Ti64) (r int32) { if (*TunixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if _robust_ftruncate(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { _storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__error(tls)))) - return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3496, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42532)) + return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3522, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42783)) } } rc = _unixMapfile(tls, pFile, nByte) @@ -26473,7 +26623,7 @@ func _unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) (r int3 _unixModeBit(tls, pFile, uint8(UNIXFILE_PSOW), pArg) return SQLITE_OK case int32(SQLITE_FCNTL_VFSNAME): - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, (*Tsqlite3_vfs)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, (*Tsqlite3_vfs)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK case int32(SQLITE_FCNTL_TEMPFILENAME): zTFile = Xsqlite3_malloc64(tls, libc.Uint64FromInt32((*Tsqlite3_vfs)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pFile)).FpVfs)).FmxPathname)) @@ -26814,7 +26964,7 @@ func _unixShmPurge(tls *libc.TLS, pFd uintptr) { } Xsqlite3_free(tls, (*TunixShmNode)(unsafe.Pointer(p)).FapRegion) if (*TunixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - _robust_close(tls, pFd, (*TunixShmNode)(unsafe.Pointer(p)).FhShm, int32(43136)) + _robust_close(tls, pFd, (*TunixShmNode)(unsafe.Pointer(p)).FhShm, int32(43393)) (*TunixShmNode)(unsafe.Pointer(p)).FhShm = -int32(1) } (*TunixInodeInfo)(unsafe.Pointer((*TunixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -26877,7 +27027,7 @@ func _unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) (r in ** help detect if a -shm file truncation is legitimate or is the work ** or a rogue process. */ if rc == SQLITE_OK && _robust_ftruncate(tls, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(18)<<libc.Int32FromInt32(8), __ccgo_ts+3496, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43206)) + rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(18)<<libc.Int32FromInt32(8), __ccgo_ts+3522, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43463)) } } } else { @@ -26970,7 +27120,7 @@ func _unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) (r int32) { v1 = pShmNode + 1*96 (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FzFilename = v1 zShm = v1 - Xsqlite3_snprintf(tls, nShmFilename, zShm, __ccgo_ts+3876, libc.VaList(bp+232, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, __ccgo_ts+3902, libc.VaList(bp+232, zBasePath)) (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm = -int32(1) (*TunixInodeInfo)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FpInode = (*TunixFile)(unsafe.Pointer(pDbFd)).FpInode @@ -26982,13 +27132,13 @@ func _unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) (r int32) { } } if libc.Int32FromUint8((*TunixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0 { - if 0 == Xsqlite3_uri_boolean(tls, (*TunixFile)(unsafe.Pointer(pDbFd)).FzPath, __ccgo_ts+3883, 0) { + if 0 == Xsqlite3_uri_boolean(tls, (*TunixFile)(unsafe.Pointer(pDbFd)).FzPath, __ccgo_ts+3909, 0) { (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm = _robust_open(tls, zShm, libc.Int32FromInt32(O_RDWR)|libc.Int32FromInt32(O_CREAT)|libc.Int32FromInt32(O_NOFOLLOW), libc.Uint16FromInt32(libc.Int32FromUint16((*(*Tstat)(unsafe.Pointer(bp))).Fst_mode)&libc.Int32FromInt32(0777))) } if (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm < 0 { (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm = _robust_open(tls, zShm, libc.Int32FromInt32(O_RDONLY)|libc.Int32FromInt32(O_NOFOLLOW), libc.Uint16FromInt32(libc.Int32FromUint16((*(*Tstat)(unsafe.Pointer(bp))).Fst_mode)&libc.Int32FromInt32(0777))) if (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm < 0 { - rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(43343)), __ccgo_ts+3460, zShm, int32(43343)) + rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(43600)), __ccgo_ts+3486, zShm, int32(43600)) goto shm_open_err } (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FisReadonly = uint8(1) @@ -27110,7 +27260,7 @@ func _unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExte *(*int32)(unsafe.Pointer(bp + 224)) = 0 if _seekAndWriteFd(tls, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*_pgsz+_pgsz-int32(1)), __ccgo_ts+1665, int32(1), bp+224) != int32(1) { zFile = (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(19)<<libc.Int32FromInt32(8), __ccgo_ts+3531, zFile, int32(43487)) + rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(19)<<libc.Int32FromInt32(8), __ccgo_ts+3557, zFile, int32(43744)) goto shmpage_out } goto _1 @@ -27138,7 +27288,7 @@ func _unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExte } pMem = (*(*func(*libc.TLS, uintptr, Tsize_t, int32, int32, int32, Toff_t) uintptr)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(22)].FpCurrent})))(tls, uintptr(0), libc.Uint64FromInt32(nMap), v2, int32(MAP_SHARED), (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(int64(szRegion)*libc.Int64FromUint16((*TunixShmNode)(unsafe.Pointer(pShmNode)).FnRegion))) if pMem == uintptr(-libc.Int32FromInt32(1)) { - rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(21)<<libc.Int32FromInt32(8), __ccgo_ts+3618, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43514)) + rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(21)<<libc.Int32FromInt32(8), __ccgo_ts+3644, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43771)) goto shmpage_out } } else { @@ -27219,15 +27369,14 @@ func _unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) ( /* Check that, if this to be a blocking lock, no locks that occur later ** in the following list than the lock being obtained are already held: ** - ** 1. Checkpointer lock (ofst==1). - ** 2. Write lock (ofst==0). - ** 3. Read locks (ofst>=3 && ofst<SQLITE_SHM_NLOCK). + ** 1. Recovery lock (ofst==2). + ** 2. Checkpointer lock (ofst==1). + ** 3. Write lock (ofst==0). + ** 4. Read locks (ofst>=3 && ofst<SQLITE_SHM_NLOCK). ** ** In other words, if this is a blocking lock, none of the locks that ** occur later in the above list than the lock being obtained may be ** held. - ** - ** It is not permitted to block on the RECOVER lock. */ /* Check if there is any work to do. There are three cases: ** @@ -27446,7 +27595,7 @@ func _unixRemapfile(tls *libc.TLS, pFd uintptr, nNew Ti64) { var pNew, pOrig, pReq, zErr uintptr var v1 Tsqlite3_int64 _, _, _, _, _, _, _, _, _, _ = flags, h, nOrig, nReuse, pNew, pOrig, pReq, szSyspage, zErr, v1 - zErr = __ccgo_ts + 3618 + zErr = __ccgo_ts + 3644 h = (*TunixFile)(unsafe.Pointer(pFd)).Fh /* File descriptor open on db file */ pOrig = (*TunixFile)(unsafe.Pointer(pFd)).FpMapRegion /* Pointer to current file mapping */ nOrig = (*TunixFile)(unsafe.Pointer(pFd)).FmmapSizeActual /* Size of pOrig region in bytes */ @@ -27481,7 +27630,7 @@ func _unixRemapfile(tls *libc.TLS, pFd uintptr, nNew Ti64) { if pNew == uintptr(-libc.Int32FromInt32(1)) { pNew = uintptr(0) nNew = 0 - _unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*TunixFile)(unsafe.Pointer(pFd)).FzPath, int32(43954)) + _unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*TunixFile)(unsafe.Pointer(pFd)).FzPath, int32(44210)) /* If the mmap() above failed, assume that all subsequent mmap() calls ** will probably fail too. Fall back to using xRead/xWrite exclusively ** in this case. */ @@ -27817,11 +27966,11 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam } else { v1 = uintptr(0) } - if Xsqlite3_uri_boolean(tls, v1, __ccgo_ts+3896, int32(SQLITE_POWERSAFE_OVERWRITE)) != 0 { + if Xsqlite3_uri_boolean(tls, v1, __ccgo_ts+3922, int32(SQLITE_POWERSAFE_OVERWRITE)) != 0 { p2 = pNew + 30 *(*uint16)(unsafe.Pointer(p2)) = uint16(int32(*(*uint16)(unsafe.Pointer(p2))) | libc.Int32FromInt32(UNIXFILE_PSOW)) } - if libc.Xstrcmp(tls, (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, __ccgo_ts+3901) == 0 { + if libc.Xstrcmp(tls, (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, __ccgo_ts+3927) == 0 { p3 = pNew + 30 *(*uint16)(unsafe.Pointer(p3)) = uint16(int32(*(*uint16)(unsafe.Pointer(p3))) | libc.Int32FromInt32(UNIXFILE_EXCL)) } @@ -27852,7 +28001,7 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam ** implicit assumption here is that if fstat() fails, things are in ** such bad shape that dropping a lock or two doesn't matter much. */ - _robust_close(tls, pNew, h, int32(44462)) + _robust_close(tls, pNew, h, int32(44718)) h = -int32(1) } _unixLeaveMutex(tls) @@ -27863,7 +28012,7 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam if zLockFile == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, __ccgo_ts+3911, libc.VaList(bp+8, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, __ccgo_ts+3937, libc.VaList(bp+8, zFilename)) } (*TunixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -27871,7 +28020,7 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam _storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - _robust_close(tls, pNew, h, int32(44547)) + _robust_close(tls, pNew, h, int32(44803)) } } else { (*Tsqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -27886,10 +28035,10 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam // ** Directories to consider for temp files. // */ var _azTempDirs = [6]uintptr{ - 2: __ccgo_ts + 3919, - 3: __ccgo_ts + 3928, - 4: __ccgo_ts + 3937, - 5: __ccgo_ts + 1678, + 2: __ccgo_ts + 3945, + 3: __ccgo_ts + 3954, + 4: __ccgo_ts + 3963, + 5: __ccgo_ts + 1704, } // C documentation @@ -27898,8 +28047,8 @@ var _azTempDirs = [6]uintptr{ // ** Initialize first two members of azTempDirs[] array. // */ func _unixTempFileInit(tls *libc.TLS) { - _azTempDirs[0] = libc.Xgetenv(tls, __ccgo_ts+3942) - _azTempDirs[int32(1)] = libc.Xgetenv(tls, __ccgo_ts+3956) + _azTempDirs[0] = libc.Xgetenv(tls, __ccgo_ts+3968) + _azTempDirs[int32(1)] = libc.Xgetenv(tls, __ccgo_ts+3982) } // C documentation @@ -27961,7 +28110,7 @@ func _unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) (r int32) { for cond := true; cond; cond = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(2)].FpCurrent})))(tls, zBuf, 0) == 0 { Xsqlite3_randomness(tls, int32(8), bp) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-int32(2)))) = 0 - Xsqlite3_snprintf(tls, nBuf, zBuf, __ccgo_ts+3963, libc.VaList(bp+16, zDir, *(*Tu64)(unsafe.Pointer(bp)), 0)) + Xsqlite3_snprintf(tls, nBuf, zBuf, __ccgo_ts+3989, libc.VaList(bp+16, zDir, *(*Tu64)(unsafe.Pointer(bp)), 0)) if v2 = int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-int32(2))))) != 0; !v2 { v1 = iLimit iLimit++ @@ -28133,7 +28282,7 @@ func _findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintpt ** filename, check for the "modeof" parameter. If present, interpret ** its value as a filename and try to copy the mode, uid and gid from ** that file. */ - z = Xsqlite3_uri_parameter(tls, zPath, __ccgo_ts+3980) + z = Xsqlite3_uri_parameter(tls, zPath, __ccgo_ts+4006) if z != 0 { rc = _getFileMode(tls, z, pMode, pUid, pGid) } @@ -28288,7 +28437,7 @@ func _unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags } } if fd < 0 { - rc2 = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(44995)), __ccgo_ts+3460, zName, int32(44995)) + rc2 = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45251)), __ccgo_ts+3486, zName, int32(45251)) if rc == SQLITE_OK { rc = rc2 } @@ -28365,7 +28514,7 @@ func _unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) ( if *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(ENOENT) { rc = libc.Int32FromInt32(SQLITE_IOERR) | libc.Int32FromInt32(23)<<libc.Int32FromInt32(8) } else { - rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(10)<<libc.Int32FromInt32(8), __ccgo_ts+3570, zPath, int32(45134)) + rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(10)<<libc.Int32FromInt32(8), __ccgo_ts+3596, zPath, int32(45390)) } return rc } @@ -28373,9 +28522,9 @@ func _unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) ( rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(17)].FpCurrent})))(tls, zPath, bp) if rc == SQLITE_OK { if _full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(5)<<libc.Int32FromInt32(8), __ccgo_ts+3987, zPath, int32(45144)) + rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(5)<<libc.Int32FromInt32(8), __ccgo_ts+4013, zPath, int32(45400)) } - _robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), int32(45146)) + _robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), int32(45402)) } else { rc = SQLITE_OK } @@ -28482,7 +28631,7 @@ func _appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName in zIn = (*TDbPath)(unsafe.Pointer(pPath)).FzOut if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(27)].FpCurrent})))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__error(tls))) != int32(ENOENT) { - (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45240)), __ccgo_ts+3658, zIn, int32(45240)) + (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45496)), __ccgo_ts+3684, zIn, int32(45496)) } } else { if libc.Int32FromUint16((*(*Tstat)(unsafe.Pointer(bp))).Fst_mode)&int32(0170000) == int32(0120000) { @@ -28490,12 +28639,12 @@ func _appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName in v5 = *(*int32)(unsafe.Pointer(v6)) *(*int32)(unsafe.Pointer(v6))++ if v5 > int32(SQLITE_MAX_SYMLINK) { - (*TDbPath)(unsafe.Pointer(pPath)).Frc = _sqlite3CantopenError(tls, int32(45246)) + (*TDbPath)(unsafe.Pointer(pPath)).Frc = _sqlite3CantopenError(tls, int32(45502)) return } got = (*(*func(*libc.TLS, uintptr, uintptr, Tsize_t) Tssize_t)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(26)].FpCurrent})))(tls, zIn, bp+224, libc.Uint64FromInt64(1026)-libc.Uint64FromInt32(2)) if got <= 0 || got >= libc.Int64FromInt64(1026)-libc.Int64FromInt32(2) { - (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45251)), __ccgo_ts+3649, zIn, int32(45251)) + (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45507)), __ccgo_ts+3675, zIn, int32(45507)) return } (*(*[1026]int8)(unsafe.Pointer(bp + 224)))[got] = 0 @@ -28563,14 +28712,14 @@ func _unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z (*(*TDbPath)(unsafe.Pointer(bp))).FzOut = zOut if int32(*(*int8)(unsafe.Pointer(zPath))) != int32('/') { if (*(*func(*libc.TLS, uintptr, Tsize_t) uintptr)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(3)].FpCurrent})))(tls, bp+24, libc.Uint64FromInt64(1026)-libc.Uint64FromInt32(2)) == uintptr(0) { - return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45309)), __ccgo_ts+3478, zPath, int32(45309)) + return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45565)), __ccgo_ts+3504, zPath, int32(45565)) } _appendAllPathElements(tls, bp, bp+24) } _appendAllPathElements(tls, bp, zPath) *(*int8)(unsafe.Pointer(zOut + uintptr((*(*TDbPath)(unsafe.Pointer(bp))).FnUsed))) = 0 if (*(*TDbPath)(unsafe.Pointer(bp))).Frc != 0 || (*(*TDbPath)(unsafe.Pointer(bp))).FnUsed < int32(2) { - return _sqlite3CantopenError(tls, int32(45315)) + return _sqlite3CantopenError(tls, int32(45571)) } if (*(*TDbPath)(unsafe.Pointer(bp))).FnSymlink != 0 { return libc.Int32FromInt32(SQLITE_OK) | libc.Int32FromInt32(2)<<libc.Int32FromInt32(8) @@ -28645,7 +28794,7 @@ func _unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { _unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, __ccgo_ts+3862, libc.VaList(bp+8, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, __ccgo_ts+3888, libc.VaList(bp+8, zErr)) } _unixLeaveMutex(tls) } @@ -28690,7 +28839,7 @@ func _unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) ( */ libc.Xmemset(tls, zBuf, 0, libc.Uint64FromInt32(nBuf)) libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_randomnessPid)), libc.Xgetpid(tls)) - fd = _robust_open(tls, __ccgo_ts+3993, O_RDONLY, uint16(0)) + fd = _robust_open(tls, __ccgo_ts+4019, O_RDONLY, uint16(0)) if fd < 0 { libc.Xtime(tls, bp) libc.Xmemcpy(tls, zBuf, bp, uint64(8)) @@ -28701,7 +28850,7 @@ func _unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) ( for cond := true; cond; cond = got < 0 && *(*int32)(unsafe.Pointer(libc.X__error(tls))) == int32(EINTR) { got = int32((*(*func(*libc.TLS, int32, uintptr, Tsize_t) Tssize_t)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(8)].FpCurrent})))(tls, fd, zBuf, libc.Uint64FromInt32(nBuf))) } - _robust_close(tls, uintptr(0), fd, int32(45417)) + _robust_close(tls, uintptr(0), fd, int32(45673)) } return nBuf } @@ -28724,7 +28873,7 @@ func _unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) (r int32) { (*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec = int64(microseconds % int32(1000000) * int32(1000)) /* Almost all modern unix systems support nanosleep(). But if you are ** compiling for one of the rare exceptions, you can use - ** -DHAVE_NANOSLEEP=0 (perhaps in conjuction with -DHAVE_USLEEP if + ** -DHAVE_NANOSLEEP=0 (perhaps in conjunction with -DHAVE_USLEEP if ** usleep() is available) in order to bypass the use of nanosleep() */ libc.Xnanosleep(tls, bp, libc.UintptrFromInt32(0)) _ = NotUsed @@ -29051,25 +29200,25 @@ var _aVfs = [4]Tsqlite3_vfs{ FiVersion: int32(3), FszOsFile: int32(120), FmxPathname: int32(MAX_PATHNAME), - FzName: __ccgo_ts + 4006, + FzName: __ccgo_ts + 4032, }, 1: { FiVersion: int32(3), FszOsFile: int32(120), FmxPathname: int32(MAX_PATHNAME), - FzName: __ccgo_ts + 4011, + FzName: __ccgo_ts + 4037, }, 2: { FiVersion: int32(3), FszOsFile: int32(120), FmxPathname: int32(MAX_PATHNAME), - FzName: __ccgo_ts + 4021, + FzName: __ccgo_ts + 4047, }, 3: { FiVersion: int32(3), FszOsFile: int32(120), FmxPathname: int32(MAX_PATHNAME), - FzName: __ccgo_ts + 3901, + FzName: __ccgo_ts + 3927, }, } @@ -29348,7 +29497,7 @@ var _memdb_g TMemFS var _memdb_vfs = Tsqlite3_vfs{ FiVersion: int32(2), FmxPathname: int32(1024), - FzName: __ccgo_ts + 4034, + FzName: __ccgo_ts + 4060, } func init() { @@ -29694,7 +29843,7 @@ func _memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) (r rc = int32(SQLITE_NOTFOUND) _memdbEnter(tls, p) if op == int32(SQLITE_FCNTL_VFSNAME) { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+4040, libc.VaList(bp+8, (*TMemStore)(unsafe.Pointer(p)).FaData, (*TMemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+4066, libc.VaList(bp+8, (*TMemStore)(unsafe.Pointer(p)).FaData, (*TMemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == int32(SQLITE_FCNTL_SIZE_LIMIT) { @@ -29789,12 +29938,12 @@ func _memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags i i++ } if p == uintptr(0) { - p = _sqlite3Malloc(tls, uint64(uint64(72)+libc.Uint64FromInt32(szName)+uint64(3))) + p = _sqlite3Malloc(tls, uint64(72)+libc.Uint64FromInt64(int64(szName))+uint64(3)) if p == uintptr(0) { Xsqlite3_mutex_leave(tls, pVfsMutex) return int32(SQLITE_NOMEM) } - apNew = _sqlite3Realloc(tls, _memdb_g.FapMemStore, uint64(uint64(8)*libc.Uint64FromInt32(_memdb_g.FnMemStore+libc.Int32FromInt32(1)))) + apNew = _sqlite3Realloc(tls, _memdb_g.FapMemStore, uint64(8)*libc.Uint64FromInt64(libc.Int64FromInt32(1)+int64(_memdb_g.FnMemStore))) if apNew == uintptr(0) { Xsqlite3_free(tls, p) Xsqlite3_mutex_leave(tls, pVfsMutex) @@ -29869,7 +30018,7 @@ func _memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, bp := tls.Alloc(16) defer tls.Free(16) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, __ccgo_ts+3862, libc.VaList(bp+8, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, __ccgo_ts+3888, libc.VaList(bp+8, zPath)) return SQLITE_OK } @@ -30016,7 +30165,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = _sqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4055, libc.VaList(bp+24, zSchema)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4081, libc.VaList(bp+24, zSchema)) if zSql != 0 { v1 = Xsqlite3_prepare_v2(tls, db, zSql, -int32(1), bp, uintptr(0)) } else { @@ -30034,7 +30183,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp sz = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) * int64(szPage) if sz == 0 { Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp))) - Xsqlite3_exec(tls, db, __ccgo_ts+4078, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, __ccgo_ts+4104, uintptr(0), uintptr(0), uintptr(0)) rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) if rc == int32(SQLITE_ROW) { sz = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) * int64(szPage) @@ -30097,7 +30246,7 @@ func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uint rc = int32(SQLITE_ERROR) goto end_deserialize } - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4103, libc.VaList(bp+16, zSchema)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4129, libc.VaList(bp+16, zSchema)) if zSql == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { @@ -30410,7 +30559,7 @@ bitvec_set_rehash: } else { libc.Xmemcpy(tls, aiValues, p+16, uint64(496)) libc.Xmemset(tls, p+16, 0, uint64(496)) - (*TBitvec)(unsafe.Pointer(p)).FiDivisor = uint32((uint64((*TBitvec)(unsafe.Pointer(p)).FiSize) + (libc.Uint64FromInt32(BITVEC_SZ)-libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4))/libc.Uint64FromInt64(8)*libc.Uint64FromInt64(8)/libc.Uint64FromInt64(8) - uint64(1)) / ((libc.Uint64FromInt32(BITVEC_SZ) - libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4)) / libc.Uint64FromInt64(8) * libc.Uint64FromInt64(8) / libc.Uint64FromInt64(8))) + (*TBitvec)(unsafe.Pointer(p)).FiDivisor = ((*TBitvec)(unsafe.Pointer(p)).FiSize + uint32((libc.Uint64FromInt32(BITVEC_SZ)-libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4))/libc.Uint64FromInt64(8)*libc.Uint64FromInt64(8)/libc.Uint64FromInt64(8)) - uint32(1)) / uint32((libc.Uint64FromInt32(BITVEC_SZ)-libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4))/libc.Uint64FromInt64(8)*libc.Uint64FromInt64(8)/libc.Uint64FromInt64(8)) rc = _sqlite3BitvecSet(tls, p, i) j = uint32(0) for { @@ -30464,7 +30613,7 @@ func _sqlite3BitvecClear(tls *libc.TLS, p uintptr, i Tu32, pBuf uintptr) { } if uint64((*TBitvec)(unsafe.Pointer(p)).FiSize) <= (libc.Uint64FromInt32(BITVEC_SZ)-libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4))/libc.Uint64FromInt64(8)*libc.Uint64FromInt64(8)/libc.Uint64FromInt64(1)*libc.Uint64FromInt32(BITVEC_SZELEM) { p1 = p + 16 + uintptr(i/uint32(BITVEC_SZELEM)) - *(*Tu8)(unsafe.Pointer(p1)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p1))) & ^(libc.Int32FromInt32(1) << (i & libc.Uint32FromInt32(libc.Int32FromInt32(BITVEC_SZELEM)-libc.Int32FromInt32(1))))) + *(*Tu8)(unsafe.Pointer(p1)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p1))) & ^libc.Int32FromUint8(libc.Uint8FromInt32(libc.Int32FromInt32(1)<<(i&libc.Uint32FromInt32(libc.Int32FromInt32(BITVEC_SZELEM)-libc.Int32FromInt32(1)))))) } else { aiValues = pBuf libc.Xmemcpy(tls, aiValues, p+16, uint64(496)) @@ -30508,7 +30657,7 @@ func _sqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { if (*TBitvec)(unsafe.Pointer(p)).FiDivisor != 0 { i = uint32(0) for { - if !(uint64(i) < (libc.Uint64FromInt32(BITVEC_SZ)-libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4))/libc.Uint64FromInt64(8)*libc.Uint64FromInt64(8)/libc.Uint64FromInt64(8)) { + if !(i < uint32((libc.Uint64FromInt32(BITVEC_SZ)-libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4))/libc.Uint64FromInt64(8)*libc.Uint64FromInt64(8)/libc.Uint64FromInt64(8))) { break } _sqlite3BitvecDestroy(tls, *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(i)*8))) @@ -30583,7 +30732,7 @@ func _sqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) (r int32) { /* Allocate the Bitvec to be tested and a linear array of ** bits to act as the reference */ pBitvec = _sqlite3BitvecCreate(tls, libc.Uint32FromInt32(sz)) - pV = _sqlite3MallocZero(tls, libc.Uint64FromInt32((sz+int32(7))/int32(8)+int32(1))) + pV = _sqlite3MallocZero(tls, libc.Uint64FromInt64((int64(7)+int64(sz))/int64(8)+int64(1))) pTmpSpace = Xsqlite3_malloc64(tls, uint64(BITVEC_SZ)) if pBitvec == uintptr(0) || pV == uintptr(0) || pTmpSpace == uintptr(0) { goto bitvec_end @@ -30637,7 +30786,7 @@ func _sqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) (r int32) { } } else { p6 = pV + uintptr((*(*int32)(unsafe.Pointer(bp))+int32(1))>>int32(3)) - *(*uint8)(unsafe.Pointer(p6)) = uint8(int32(*(*uint8)(unsafe.Pointer(p6))) & ^(libc.Int32FromInt32(1) << ((*(*int32)(unsafe.Pointer(bp)) + libc.Int32FromInt32(1)) & libc.Int32FromInt32(7)))) + *(*uint8)(unsafe.Pointer(p6)) = uint8(int32(*(*uint8)(unsafe.Pointer(p6))) & ^libc.Int32FromUint8(libc.Uint8FromInt32(libc.Int32FromInt32(1)<<((*(*int32)(unsafe.Pointer(bp))+libc.Int32FromInt32(1))&libc.Int32FromInt32(7))))) _sqlite3BitvecClear(tls, pBitvec, libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp))+int32(1)), pTmpSpace) } } @@ -31924,7 +32073,7 @@ func _sqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { _pcache1_g.FnReserve = v3 _pcache1_g.FpStart = pBuf _pcache1_g.FpFree = uintptr(0) - libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_pcache1_g))+140, 0) + libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_pcache1_g))+140, libc.Int32FromInt32(0)) for { v4 = n n-- @@ -32207,17 +32356,19 @@ func _pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) (r int32) { // */ func _pcache1ResizeHash(tls *libc.TLS, p uintptr) { var apNew, pNext, pPage, v2 uintptr - var h, i, nNew uint32 + var h uint32 + var i Tu32 + var nNew Tu64 _, _, _, _, _, _, _ = apNew, h, i, nNew, pNext, pPage, v2 - nNew = (*TPCache1)(unsafe.Pointer(p)).FnHash * uint32(2) - if nNew < uint32(256) { - nNew = uint32(256) + nNew = uint64(2) * uint64((*TPCache1)(unsafe.Pointer(p)).FnHash) + if nNew < uint64(256) { + nNew = uint64(256) } Xsqlite3_mutex_leave(tls, (*TPGroup)(unsafe.Pointer((*TPCache1)(unsafe.Pointer(p)).FpGroup)).Fmutex) if (*TPCache1)(unsafe.Pointer(p)).FnHash != 0 { _sqlite3BeginBenignMalloc(tls) } - apNew = _sqlite3MallocZero(tls, uint64(8)*uint64(nNew)) + apNew = _sqlite3MallocZero(tls, uint64(8)*nNew) if (*TPCache1)(unsafe.Pointer(p)).FnHash != 0 { _sqlite3EndBenignMalloc(tls) } @@ -32235,7 +32386,7 @@ func _pcache1ResizeHash(tls *libc.TLS, p uintptr) { if !(v2 != uintptr(0)) { break } - h = (*TPgHdr1)(unsafe.Pointer(pPage)).FiKey % nNew + h = uint32(uint64((*TPgHdr1)(unsafe.Pointer(pPage)).FiKey) % nNew) pNext = (*TPgHdr1)(unsafe.Pointer(pPage)).FpNext (*TPgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*8)) *(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*8)) = pPage @@ -32247,7 +32398,7 @@ func _pcache1ResizeHash(tls *libc.TLS, p uintptr) { } Xsqlite3_free(tls, (*TPCache1)(unsafe.Pointer(p)).FapHash) (*TPCache1)(unsafe.Pointer(p)).FapHash = apNew - (*TPCache1)(unsafe.Pointer(p)).FnHash = nNew + (*TPCache1)(unsafe.Pointer(p)).FnHash = uint32(nNew) } } @@ -32448,10 +32599,11 @@ func _pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { // */ func _pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) (r uintptr) { var pCache, pGroup, v1 uintptr - var sz, v2 int32 + var sz Ti64 + var v2 int32 _, _, _, _, _ = pCache, pGroup, sz, v1, v2 /* Bytes of memory required to allocate the new cache */ - sz = libc.Int32FromUint64(uint64(88) + uint64(80)*libc.Uint64FromInt32(_pcache1_g.FseparateCache)) - pCache = _sqlite3MallocZero(tls, libc.Uint64FromInt32(sz)) + sz = libc.Int64FromUint64(uint64(88) + uint64(80)*libc.Uint64FromInt32(_pcache1_g.FseparateCache)) + pCache = _sqlite3MallocZero(tls, libc.Uint64FromInt64(sz)) if pCache != 0 { if _pcache1_g.FseparateCache != 0 { pGroup = pCache + 1*88 @@ -34596,7 +34748,7 @@ func _jrnlBufferSize(tls *libc.TLS, pPager uintptr) (r int32) { // ** If an error occurs while reading from the journal file, an SQLite // ** error code is returned. // */ -func _readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper Tu32) (r int32) { +func _readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper Tu64) (r int32) { bp := tls.Alloc(32) defer tls.Free(32) var rc, v1, v2, v4, v6, v8 int32 @@ -34614,7 +34766,7 @@ func _readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper Tu32 v2 = _read32bits(tls, pJrnl, *(*Ti64)(unsafe.Pointer(bp + 8))-int64(16), bp) rc = v2 } - if v5 = v3 || SQLITE_OK != v2 || *(*Tu32)(unsafe.Pointer(bp)) >= nSuper || libc.Int64FromUint32(*(*Tu32)(unsafe.Pointer(bp))) > *(*Ti64)(unsafe.Pointer(bp + 8))-int64(16) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0); !v5 { + if v5 = v3 || SQLITE_OK != v2 || uint64(*(*Tu32)(unsafe.Pointer(bp))) >= nSuper || libc.Int64FromUint32(*(*Tu32)(unsafe.Pointer(bp))) > *(*Ti64)(unsafe.Pointer(bp + 8))-int64(16) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0); !v5 { v4 = _read32bits(tls, pJrnl, *(*Ti64)(unsafe.Pointer(bp + 8))-int64(12), bp+16) rc = v4 } @@ -35187,6 +35339,15 @@ func _pager_unlock(tls *libc.TLS, pPager uintptr) { (*TPager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) _releaseAllSavepoints(tls, pPager) if (*TPager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { + if libc.Int32FromUint8((*TPager)(unsafe.Pointer(pPager)).FeState) == int32(PAGER_ERROR) { + /* If an IO error occurs in wal.c while attempting to wrap the wal file, + ** then the Wal object may be holding a write-lock but no read-lock. + ** This call ensures that the write-lock is dropped as well. We cannot + ** have sqlite3WalEndReadTransaction() drop the write-lock, as it once + ** did, because this would break "BEGIN EXCLUSIVE" handling for + ** SQLITE_ENABLE_SETLK_TIMEOUT builds. */ + _sqlite3WalEndWriteTransaction(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal) + } _sqlite3WalEndReadTransaction(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal) (*TPager)(unsafe.Pointer(pPager)).FeState = uint8(PAGER_OPEN) } else { @@ -35833,7 +35994,8 @@ func _pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pD func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) - var c, flags, flags1, nSuperPtr, rc int32 + var c, flags, flags1, rc int32 + var nSuperPtr Ti64 var pJournal, pSuper, pVfs, zFree, zJournal, zSuperJournal, zSuperPtr uintptr var v1, v2, v3 int8 var _ /* exists at bp+8 */ int32 @@ -35845,7 +36007,7 @@ func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) { /* Allocate space for both the pJournal and pSuper file descriptors. ** If successful, open the super-journal file for reading. */ - pSuper = _sqlite3MallocZero(tls, libc.Uint64FromInt32((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile*int32(2))) + pSuper = _sqlite3MallocZero(tls, libc.Uint64FromInt64(int64(2)*int64((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile))) if !(pSuper != 0) { rc = int32(SQLITE_NOMEM) pJournal = uintptr(0) @@ -35866,11 +36028,12 @@ func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) { if rc != SQLITE_OK { goto delsuper_out } - nSuperPtr = (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + int32(1) - zFree = _sqlite3Malloc(tls, libc.Uint64FromInt64(int64(4)+*(*Ti64)(unsafe.Pointer(bp))+int64(nSuperPtr)+int64(2))) + nSuperPtr = int64(1) + int64((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname) + zFree = _sqlite3Malloc(tls, libc.Uint64FromInt64(int64(4)+*(*Ti64)(unsafe.Pointer(bp))+nSuperPtr+int64(2))) if !(zFree != 0) { rc = int32(SQLITE_NOMEM) goto delsuper_out + } else { } v3 = libc.Int8FromInt32(0) *(*int8)(unsafe.Pointer(zFree + 3)) = v3 @@ -35899,7 +36062,7 @@ func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) { if rc != SQLITE_OK { goto delsuper_out } - rc = _readSuperJournal(tls, pJournal, zSuperPtr, libc.Uint32FromInt32(nSuperPtr)) + rc = _readSuperJournal(tls, pJournal, zSuperPtr, libc.Uint64FromInt64(nSuperPtr)) _sqlite3OsClose(tls, pJournal) if rc != SQLITE_OK { goto delsuper_out @@ -36132,7 +36295,7 @@ func _pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) (r int32) { ** for pageSize. */ zSuper = (*TPager)(unsafe.Pointer(pPager)).FpTmpSpace - rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint32FromInt32((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+int32(1))) + rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint64FromInt64(int64(1)+int64((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname))) if rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 { rc = _sqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+16) } @@ -36269,7 +36432,7 @@ end_playback: ** which case it requires 4 0x00 bytes in memory immediately before ** the filename. */ zSuper = (*TPager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 - rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint32FromInt32((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+int32(1))) + rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint64FromInt64(int64(1)+int64((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname))) } if rc == SQLITE_OK && (libc.Int32FromUint8((*TPager)(unsafe.Pointer(pPager)).FeState) >= int32(PAGER_WRITER_DBMOD) || libc.Int32FromUint8((*TPager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) { rc = _sqlite3PagerSync(tls, pPager, uintptr(0)) @@ -36285,7 +36448,7 @@ end_playback: rc = _pager_delsuper(tls, pPager, zSuper) } if isHot != 0 && nPlayback != 0 { - Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(2)<<libc.Int32FromInt32(8), __ccgo_ts+4118, libc.VaList(bp+32, nPlayback, (*TPager)(unsafe.Pointer(pPager)).FzJournal)) + Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(2)<<libc.Int32FromInt32(8), __ccgo_ts+4144, libc.VaList(bp+32, nPlayback, (*TPager)(unsafe.Pointer(pPager)).FzJournal)) } /* The Pager.sectorSize variable may have been updated while rolling ** back a journal created by a process with a different sector size @@ -37980,7 +38143,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u */ if zFilename != 0 && *(*int8)(unsafe.Pointer(zFilename)) != 0 { nPathname = (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + int32(1) - zPathname = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt32(nPathname*int32(2))) + zPathname = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt64(int64(2)*int64(nPathname))) if zPathname == uintptr(0) { return int32(SQLITE_NOMEM) } @@ -38011,7 +38174,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u ** as it will not be possible to open the journal file or even ** check for a hot-journal before reading. */ - rc = _sqlite3CantopenError(tls, int32(62121)) + rc = _sqlite3CantopenError(tls, int32(62854)) } if rc != SQLITE_OK { _sqlite3DbFree(tls, uintptr(0), zPathname) @@ -38062,7 +38225,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u ** specific formatting and order of the various filenames, so if the format ** changes here, be sure to change it there as well. */ - pPtr = _sqlite3MallocZero(tls, uint64((libc.Uint64FromInt64(312)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))+libc.Uint64FromInt32((pcacheSize+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint64FromInt32(((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint64FromInt32(journalFileSize*int32(2))+uint64(__SIZEOF_POINTER__)+uint64(4)+libc.Uint64FromInt32(nPathname)+uint64(1)+libc.Uint64FromInt32(nUriByte)+libc.Uint64FromInt32(nPathname)+uint64(8)+uint64(1)+libc.Uint64FromInt32(nPathname)+uint64(4)+uint64(1)+uint64(3))) + pPtr = _sqlite3MallocZero(tls, uint64((libc.Uint64FromInt64(312)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))+libc.Uint64FromInt32((pcacheSize+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint64FromInt32(((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7)))+libc.Uint64FromInt32(journalFileSize)*uint64(2)+uint64(__SIZEOF_POINTER__)+uint64(4)+libc.Uint64FromInt32(nPathname)+uint64(1)+libc.Uint64FromInt32(nUriByte)+libc.Uint64FromInt32(nPathname)+uint64(8)+uint64(1)+libc.Uint64FromInt32(nPathname)+uint64(4)+uint64(1)+uint64(3)) if !(pPtr != 0) { _sqlite3DbFree(tls, uintptr(0), zPathname) return int32(SQLITE_NOMEM) @@ -38097,7 +38260,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, libc.Uint64FromInt32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, __ccgo_ts+4145, uint64(8)) + libc.Xmemcpy(tls, pPtr, __ccgo_ts+4171, uint64(8)) pPtr += uintptr(libc.Int32FromInt32(8) + libc.Int32FromInt32(1)) } else { (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = uintptr(0) @@ -38107,7 +38270,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, libc.Uint64FromInt32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, __ccgo_ts+4154, uint64(4)) + libc.Xmemcpy(tls, pPtr, __ccgo_ts+4180, uint64(4)) pPtr += uintptr(libc.Int32FromInt32(4) + libc.Int32FromInt32(1)) } else { (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = uintptr(0) @@ -38149,8 +38312,8 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u } } } - (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = libc.Uint8FromInt32(Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4159, 0)) - if iDc&int32(SQLITE_IOCAP_IMMUTABLE) != 0 || Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4166, 0) != 0 { + (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = libc.Uint8FromInt32(Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4185, 0)) + if iDc&int32(SQLITE_IOCAP_IMMUTABLE) != 0 || Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4192, 0) != 0 { vfsFlags |= int32(SQLITE_OPEN_READONLY) goto act_like_temp_file } @@ -38489,7 +38652,7 @@ func _sqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) (r int32) { f = libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_MAIN_JOURNAL) rc = _sqlite3OsOpen(tls, pVfs, (*TPager)(unsafe.Pointer(pPager)).FzJournal, (*TPager)(unsafe.Pointer(pPager)).Fjfd, f, bp+8) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&int32(SQLITE_OPEN_READONLY) != 0 { - rc = _sqlite3CantopenError(tls, int32(62642)) + rc = _sqlite3CantopenError(tls, int32(63375)) _sqlite3OsClose(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd) } } @@ -38664,7 +38827,7 @@ func _getPageNormal(tls *libc.TLS, pPager uintptr, pgno TPgno, ppPage uintptr, f _, _, _, _ = noContent, pPg, rc, v1 rc = SQLITE_OK if pgno == uint32(0) { - return _sqlite3CorruptError(tls, int32(62855)) + return _sqlite3CorruptError(tls, int32(63588)) } *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3PcacheFetch(tls, (*TPager)(unsafe.Pointer(pPager)).FpPCache, pgno, int32(3)) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { @@ -38695,7 +38858,7 @@ func _getPageNormal(tls *libc.TLS, pPager uintptr, pgno TPgno, ppPage uintptr, f ** (2) Never try to fetch the locking page */ if pgno == (*TPager)(unsafe.Pointer(pPager)).FlckPgno { - rc = _sqlite3CorruptError(tls, int32(62887)) + rc = _sqlite3CorruptError(tls, int32(63620)) goto pager_acquire_err } (*TPgHdr)(unsafe.Pointer(pPg)).FpPager = pPager @@ -38767,7 +38930,7 @@ func _getPageMMap(tls *libc.TLS, pPager uintptr, pgno TPgno, ppPage uintptr, fla ** test in the previous statement, and avoid testing pgno==0 in the ** common case where pgno is large. */ if pgno <= uint32(1) && pgno == uint32(0) { - return _sqlite3CorruptError(tls, int32(62970)) + return _sqlite3CorruptError(tls, int32(63703)) } if bMmapOk != 0 && (*TPager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { rc = _sqlite3WalFindFrame(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal, pgno, bp+8) @@ -40124,7 +40287,7 @@ func _sqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno TPgn if pPgOld != 0 { if (*TPgHdr)(unsafe.Pointer(pPgOld)).FnRef > int64(1) { _sqlite3PagerUnrefNotNull(tls, pPgOld) - return _sqlite3CorruptError(tls, int32(64536)) + return _sqlite3CorruptError(tls, int32(65269)) } p4 = pPg + 52 *(*Tu16)(unsafe.Pointer(p4)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p4))) | libc.Int32FromUint16((*TPgHdr)(unsafe.Pointer(pPgOld)).Fflags)&libc.Int32FromInt32(PGHDR_NEED_SYNC)) @@ -40392,7 +40555,7 @@ func _sqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in ** sqlite3_wal_checkpoint() call, but it happens very rarely. ** https://sqlite.org/forum/forumpost/fd0f19d229156939 */ - Xsqlite3_exec(tls, db, __ccgo_ts+4176, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, __ccgo_ts+4202, uintptr(0), uintptr(0), uintptr(0)) } if (*TPager)(unsafe.Pointer(pPager)).FpWal != 0 { if eMode == SQLITE_CHECKPOINT_PASSIVE { @@ -40956,9 +41119,9 @@ type TWalIndexHdr = struct { type WalIndexHdr = TWalIndexHdr type TWalIterator = struct { - FiPrior Tu32 - FnSegment int32 - FaSegment [1]TWalSegment + F__ccgo_align [0]uint64 + FiPrior Tu32 + FnSegment int32 } type WalIterator = TWalIterator @@ -41162,6 +41325,11 @@ type WalCkptInfo1 = TWalCkptInfo1 /* ** An open write-ahead log file is represented by an instance of the ** following object. +** +** writeLock: +** This is usually set to 1 whenever the WRITER lock is held. However, +** if it is set to 2, then the WRITER lock is held but must be released +** by walHandleException() if a SEH exception is thrown. */ type TWal1 = struct { FpVfs uintptr @@ -41228,13 +41396,15 @@ type ht_slot = Tht_slot ** This functionality is used by the checkpoint code (see walCheckpoint()). */ type TWalIterator1 = struct { - FiPrior Tu32 - FnSegment int32 - FaSegment [1]TWalSegment + F__ccgo_align [0]uint64 + FiPrior Tu32 + FnSegment int32 } type WalIterator1 = TWalIterator1 +/* Size (in bytes) of a WalIterator object suitable for N or fewer segments */ + /* ** Define the parameters of the hash tables in the wal-index file. There ** is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -41292,7 +41462,7 @@ func _walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintp rc = SQLITE_OK /* Enlarge the pWal->apWiData[] array if required */ if (*TWal)(unsafe.Pointer(pWal)).FnWiData <= iPage { - nByte = libc.Int64FromUint64(uint64(8) * libc.Uint64FromInt32(iPage+libc.Int32FromInt32(1))) + nByte = libc.Int64FromUint64(uint64(8) * libc.Uint64FromInt64(libc.Int64FromInt32(1)+int64(iPage))) apNew = _sqlite3Realloc(tls, (*TWal)(unsafe.Pointer(pWal)).FapWiData, libc.Uint64FromInt64(nByte)) if !(apNew != 0) { *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) @@ -41393,6 +41563,7 @@ func _walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, s2 = v1 s1 = v1 } + /* nByte is a multiple of 8 between 8 and 65536 */ if !(nativeCksum != 0) { for cond := true; cond; cond = aData < aEnd { s1 += *(*Tu32)(unsafe.Pointer(aData))&uint32(0x000000FF)<<int32(24) + *(*Tu32)(unsafe.Pointer(aData))&uint32(0x0000FF00)<<int32(8) + *(*Tu32)(unsafe.Pointer(aData))&uint32(0x00FF0000)>>int32(8) + *(*Tu32)(unsafe.Pointer(aData))&uint32(0xFF000000)>>int32(24) + s2 @@ -41834,7 +42005,7 @@ func _walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame Tu32, iPage Tu32) (r in v2 = nCollide nCollide-- if v2 == 0 { - return _sqlite3CorruptError(tls, int32(66463)) + return _sqlite3CorruptError(tls, int32(67209)) } goto _1 _1: @@ -41922,7 +42093,7 @@ func _walIndexRecover(tls *libc.TLS, pWal uintptr) (r int32) { ** are able to understand */ version = _sqlite3Get4byte(tls, bp+8+4) if version != uint32(WAL_MAX_VERSION) { - rc = _sqlite3CantopenError(tls, int32(66595)) + rc = _sqlite3CantopenError(tls, int32(67341)) goto finished } /* Malloc a buffer to read frames into. */ @@ -42061,7 +42232,7 @@ finished: ** checkpointing the log file. */ if (*TWal)(unsafe.Pointer(pWal)).Fhdr.FnPage != 0 { - Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+4194, libc.VaList(bp+64, (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*TWal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+4220, libc.VaList(bp+64, (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*TWal)(unsafe.Pointer(pWal)).FzWalName)) } } goto recovery_error @@ -42437,7 +42608,7 @@ func _walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill Tu32, pp uintptr) ( iLast = (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame /* Allocate space for the WalIterator object. */ nSegment = _walFramePage(tls, iLast) + int32(1) - nByte = libc.Int64FromUint64(uint64(40) + libc.Uint64FromInt32(nSegment-libc.Int32FromInt32(1))*uint64(32) + uint64(iLast)*uint64(2)) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+8)*libc.Uint64FromInt32(nSegment)*uint64(32) + uint64(iLast)*uint64(2)) if iLast > uint32(HASHTABLE_NPAGE) { v1 = uint32(HASHTABLE_NPAGE) } else { @@ -42692,7 +42863,7 @@ func _walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy ** database plus the amount of data in the wal file, plus the ** maximum size of the pending-byte page (65536 bytes), then ** must be corruption somewhere. */ - rc = _sqlite3CorruptError(tls, int32(67405)) + rc = _sqlite3CorruptError(tls, int32(68150)) } else { _sqlite3OsFileControlHint(tls, (*TWal)(unsafe.Pointer(pWal)).FpDbFd, int32(SQLITE_FCNTL_SIZE_HINT), bp+16) } @@ -42808,7 +42979,7 @@ func _walLimitSize(tls *libc.TLS, pWal uintptr, nMax Ti64) { } _sqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, __ccgo_ts+4231, libc.VaList(bp+16, (*TWal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, __ccgo_ts+4257, libc.VaList(bp+16, (*TWal)(unsafe.Pointer(pWal)).FzWalName)) } } @@ -43023,7 +43194,14 @@ func _walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) (r int32) { rc = v3 } if v4 || SQLITE_OK == v3 { - (*TWal)(unsafe.Pointer(pWal)).FwriteLock = uint8(1) + /* If the write-lock was just obtained, set writeLock to 2 instead of + ** the usual 1. This causes walIndexPage() to behave as if the + ** write-lock were held (so that it allocates new pages as required), + ** and walHandleException() to unlock the write-lock if a SEH exception + ** is thrown. */ + if !(bWriteLock != 0) { + (*TWal)(unsafe.Pointer(pWal)).FwriteLock = uint8(2) + } v5 = _walIndexPage(tls, pWal, 0, bp) rc = v5 if SQLITE_OK == v5 { @@ -43049,7 +43227,7 @@ func _walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) (r int32) { ** this version of SQLite cannot understand. */ if badHdr == 0 && (*TWal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != uint32(WALINDEX_MAX_VERSION) { - rc = _sqlite3CantopenError(tls, int32(67849)) + rc = _sqlite3CantopenError(tls, int32(68601)) } if (*TWal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -43772,8 +43950,8 @@ func _sqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // ** read-lock. // */ func _sqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { - _sqlite3WalEndWriteTransaction(tls, pWal) if int32((*TWal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { + _sqlite3WalEndWriteTransaction(tls, pWal) _walUnlockShared(tls, pWal, int32(3)+int32((*TWal)(unsafe.Pointer(pWal)).FreadLock)) (*TWal)(unsafe.Pointer(pWal)).FreadLock = int16(-int32(1)) } @@ -43860,7 +44038,7 @@ func _walFindFrame(tls *libc.TLS, pWal uintptr, pgno TPgno, piRead uintptr) (r i nCollide-- if v3 == 0 { *(*Tu32)(unsafe.Pointer(piRead)) = uint32(0) - return _sqlite3CorruptError(tls, int32(68695)) + return _sqlite3CorruptError(tls, int32(69451)) } iKey = _walNextHash(tls, iKey) } @@ -44357,7 +44535,7 @@ func _walFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTrunc } } if libc.Int32FromUint32((*TWal)(unsafe.Pointer(pWal)).FszPage) != szPage { - return _sqlite3CorruptError(tls, int32(69218)) /* TH3 test case: cov1/corrupt155.test */ + return _sqlite3CorruptError(tls, int32(69974)) /* TH3 test case: cov1/corrupt155.test */ } /* Setup information needed to write frames into the WAL */ (*(*TWalWriter)(unsafe.Pointer(bp))).FpWal = pWal @@ -44606,7 +44784,7 @@ func _sqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, /* Copy data from the log to the database file. */ if rc == SQLITE_OK { if (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && _walPagesize(tls, pWal) != nBuf { - rc = _sqlite3CorruptError(tls, int32(69478)) + rc = _sqlite3CorruptError(tls, int32(70234)) } else { rc = _walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -45379,6 +45557,11 @@ type CellInfo1 = TCellInfo1 */ /* +** Maximum amount of storage local to a database page, regardless of +** page size. + */ + +/* ** A cursor is a pointer to a particular entry within a particular ** b-tree within a database file. ** @@ -45744,10 +45927,11 @@ func _sqlite3BtreeLeave(tls *libc.TLS, p uintptr) { // ** at the same instant. // */ func _btreeEnterAll(tls *libc.TLS, db uintptr) { - var i, skipOk int32 + var i int32 var p uintptr + var skipOk Tu8 _, _, _ = i, p, skipOk - skipOk = int32(1) + skipOk = uint8(1) i = 0 for { if !(i < (*Tsqlite3)(unsafe.Pointer(db)).FnDb) { @@ -45756,14 +45940,14 @@ func _btreeEnterAll(tls *libc.TLS, db uintptr) { p = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32))).FpBt if p != 0 && (*TBtree)(unsafe.Pointer(p)).Fsharable != 0 { _sqlite3BtreeEnter(tls, p) - skipOk = 0 + skipOk = uint8(0) } goto _1 _1: ; i++ } - (*Tsqlite3)(unsafe.Pointer(db)).FnoSharedCache = libc.Uint8FromInt32(skipOk) + (*Tsqlite3)(unsafe.Pointer(db)).FnoSharedCache = skipOk } func _sqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { @@ -46463,7 +46647,7 @@ func _btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey Ti64, bias int } _sqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if libc.Int32FromUint16((*TUnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || libc.Int32FromUint16((*TUnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = _sqlite3CorruptError(tls, int32(71660)) + rc = _sqlite3CorruptError(tls, int32(72422)) } else { rc = _sqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -46641,7 +46825,7 @@ func _ptrmapPut(tls *libc.TLS, pBt uintptr, key TPgno, eType Tu8, parent TPgno, } /* The super-journal page number must never be used as a pointer map page */ if key == uint32(0) { - *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(71858)) + *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72620)) return } iPtrmap = _ptrmapPageno(tls, pBt, key) @@ -46654,12 +46838,12 @@ func _ptrmapPut(tls *libc.TLS, pBt uintptr, key TPgno, eType Tu8, parent TPgno, /* The first byte of the extra data is the MemPage.isInit byte. ** If that byte is set, it means this page is also being used ** as a btree page. */ - *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(71871)) + *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72633)) goto ptrmap_exit } offset = libc.Int32FromUint32(libc.Uint32FromInt32(5) * (key - iPtrmap - libc.Uint32FromInt32(1))) if offset < 0 { - *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(71876)) + *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72638)) goto ptrmap_exit } pPtrmap = _sqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -46703,7 +46887,7 @@ func _ptrmapGet(tls *libc.TLS, pBt uintptr, key TPgno, pEType uintptr, pPgno uin offset = libc.Int32FromUint32(libc.Uint32FromInt32(5) * (key - libc.Uint32FromInt32(iPtrmap) - libc.Uint32FromInt32(1))) if offset < 0 { _sqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) - return _sqlite3CorruptError(tls, int32(71921)) + return _sqlite3CorruptError(tls, int32(72683)) } *(*Tu8)(unsafe.Pointer(pEType)) = *(*Tu8)(unsafe.Pointer(pPtrmap + uintptr(offset))) if pPgno != 0 { @@ -46711,7 +46895,7 @@ func _ptrmapGet(tls *libc.TLS, pBt uintptr, key TPgno, pEType uintptr, pPgno uin } _sqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp))) if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pEType))) < int32(1) || libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pEType))) > int32(5) { - return _sqlite3CorruptError(tls, int32(71929)) + return _sqlite3CorruptError(tls, int32(72691)) } return SQLITE_OK } @@ -46899,7 +47083,7 @@ func _btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp /* This is the (easy) common case where the entire payload fits ** on the local page. No overflow is required. */ - (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(nPayload + uint32(libc.Uint16FromInt64(int64(pIter)-int64(pCell)))) + (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(nPayload)) + libc.Int32FromUint16(libc.Uint16FromInt64(int64(pIter)-int64(pCell)))) if libc.Int32FromUint16((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize) < int32(4) { (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(4) } @@ -46932,7 +47116,7 @@ func _btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo /* This is the (easy) common case where the entire payload fits ** on the local page. No overflow is required. */ - (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(nPayload + uint32(libc.Uint16FromInt64(int64(pIter)-int64(pCell)))) + (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(nPayload)) + libc.Int32FromUint16(libc.Uint16FromInt64(int64(pIter)-int64(pCell)))) if libc.Int32FromUint16((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize) < int32(4) { (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(4) } @@ -47131,7 +47315,7 @@ func _ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxParseCell})))(tls, pPage, pCell, bp) if uint32((*(*TCellInfo)(unsafe.Pointer(bp))).FnLocal) < (*(*TCellInfo)(unsafe.Pointer(bp))).FnPayload { if uint64(pCell) < uint64((*TMemPage)(unsafe.Pointer(pSrc)).FaDataEnd) && uint64(pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnLocal)) > uint64((*TMemPage)(unsafe.Pointer(pSrc)).FaDataEnd) { - *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72369)) + *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(73136)) return } ovfl = _sqlite3Get4byte(tls, pCell+uintptr(libc.Int32FromUint16((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize)-int32(4))) @@ -47171,12 +47355,12 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) { if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))) <= nMaxFrag { iFree = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(1)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(1)) + 1))) if iFree > usableSize-int32(4) { - return _sqlite3CorruptError(tls, int32(72427)) + return _sqlite3CorruptError(tls, int32(73194)) } if iFree != 0 { iFree2 = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree) + 1))) if iFree2 > usableSize-int32(4) { - return _sqlite3CorruptError(tls, int32(72430)) + return _sqlite3CorruptError(tls, int32(73197)) } if 0 == iFree2 || libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+int32(1))))) == 0 { pEnd = data + uintptr(cellOffset+nCell*int32(2)) @@ -47184,21 +47368,21 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) { sz = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+int32(2)) + 1))) top = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1))) if top >= iFree { - return _sqlite3CorruptError(tls, int32(72438)) + return _sqlite3CorruptError(tls, int32(73205)) } if iFree2 != 0 { if iFree+sz > iFree2 { - return _sqlite3CorruptError(tls, int32(72441)) + return _sqlite3CorruptError(tls, int32(73208)) } sz2 = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+int32(2)) + 1))) if iFree2+sz2 > usableSize { - return _sqlite3CorruptError(tls, int32(72443)) + return _sqlite3CorruptError(tls, int32(73210)) } libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), libc.Uint64FromInt32(iFree2-(iFree+sz))) sz += sz2 } else { if iFree+sz > usableSize { - return _sqlite3CorruptError(tls, int32(72447)) + return _sqlite3CorruptError(tls, int32(73214)) } } cbrk = top + sz @@ -47245,12 +47429,12 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) { ** if PRAGMA cell_size_check=ON. */ if pc > iCellLast { - return _sqlite3CorruptError(tls, int32(72480)) + return _sqlite3CorruptError(tls, int32(73247)) } size = libc.Int32FromUint16((*(*func(*libc.TLS, uintptr, uintptr) Tu16)(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxCellSize})))(tls, pPage, src+uintptr(pc))) cbrk -= size if cbrk < iCellStart || pc+size > usableSize { - return _sqlite3CorruptError(tls, int32(72486)) + return _sqlite3CorruptError(tls, int32(73253)) } *(*Tu8)(unsafe.Pointer(pAddr1)) = libc.Uint8FromInt32(cbrk >> libc.Int32FromInt32(8)) *(*Tu8)(unsafe.Pointer(pAddr1 + 1)) = libc.Uint8FromInt32(cbrk) @@ -47266,7 +47450,7 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) { defragment_out: ; if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(7)))))+cbrk-iCellFirst != (*TMemPage)(unsafe.Pointer(pPage)).FnFree { - return _sqlite3CorruptError(tls, int32(72500)) + return _sqlite3CorruptError(tls, int32(73267)) } *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))) = libc.Uint8FromInt32(cbrk >> libc.Int32FromInt32(8)) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1)) = libc.Uint8FromInt32(cbrk) @@ -47326,7 +47510,7 @@ func _pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) (r uint } else { if x+pc > maxPC { /* This slot extends off the end of the usable part of the page */ - *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(72557)) + *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(73324)) return uintptr(0) } else { /* The slot remains on the free-list. Reduce its size to account @@ -47343,14 +47527,14 @@ func _pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) (r uint if pc <= iAddr { if pc != 0 { /* The next slot in the chain comes before the current slot */ - *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(72572)) + *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(73339)) } return uintptr(0) } } if pc > maxPC+nByte-int32(4) { /* The free slot chain extends off the end of the page */ - *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(72579)) + *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(73346)) } return uintptr(0) } @@ -47393,11 +47577,11 @@ func _allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) (r if top == 0 && (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == uint32(65536) { top = int32(65536) } else { - return _sqlite3CorruptError(tls, int32(72627)) + return _sqlite3CorruptError(tls, int32(73394)) } } else { if top > libc.Int32FromUint32((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return _sqlite3CorruptError(tls, int32(72630)) + return _sqlite3CorruptError(tls, int32(73397)) } } /* If there is enough space between gap and top for one more cell pointer, @@ -47411,7 +47595,7 @@ func _allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) (r g2 = v1 *(*int32)(unsafe.Pointer(pIdx)) = v1 if g2 <= gap { - return _sqlite3CorruptError(tls, int32(72647)) + return _sqlite3CorruptError(tls, int32(73414)) } else { return SQLITE_OK } @@ -47464,42 +47648,40 @@ func _allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) (r // ** at the end of the page. So do additional corruption checks inside this // ** routine and return SQLITE_CORRUPT if any problems are found. // */ -func _freeSpace(tls *libc.TLS, pPage uintptr, iStart Tu16, iSize Tu16) (r int32) { +func _freeSpace(tls *libc.TLS, pPage uintptr, iStart int32, iSize int32) (r int32) { var data, pTmp, p2 uintptr - var hdr, nFrag Tu8 - var iEnd Tu32 - var iFreeBlk, iOrigSize, iPtr, x, v1 Tu16 - var iPtrEnd int32 + var hdr Tu8 + var iEnd, iFreeBlk, iOrigSize, iPtr, iPtrEnd, nFrag, x, v1 int32 _, _, _, _, _, _, _, _, _, _, _, _ = data, hdr, iEnd, iFreeBlk, iOrigSize, iPtr, iPtrEnd, nFrag, pTmp, x, v1, p2 /* Page header size. 0 or 100 */ - nFrag = uint8(0) /* Reduction in fragmentation */ + nFrag = 0 /* Reduction in fragmentation */ iOrigSize = iSize /* Offset to cell content area */ - iEnd = libc.Uint32FromInt32(libc.Int32FromUint16(iStart) + libc.Int32FromUint16(iSize)) /* First byte past the iStart buffer */ + iEnd = iStart + iSize /* First byte past the iStart buffer */ data = (*TMemPage)(unsafe.Pointer(pPage)).FaData /* Temporary ptr into data[] */ /* Minimum cell size is 4 */ /* The list of freeblocks must be in ascending order. Find the ** spot on the list where iStart should be inserted. */ hdr = (*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset - iPtr = libc.Uint16FromInt32(libc.Int32FromUint8(hdr) + int32(1)) - if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iPtr)+int32(1))))) == 0 && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr)))) == 0 { - iFreeBlk = uint16(0) /* Shortcut for the case when the freelist is empty */ + iPtr = libc.Int32FromUint8(hdr) + int32(1) + if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr+int32(1))))) == 0 && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr)))) == 0 { + iFreeBlk = 0 /* Shortcut for the case when the freelist is empty */ } else { for { - v1 = libc.Uint16FromInt32(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)))) + v1 = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1))) iFreeBlk = v1 - if !(libc.Int32FromUint16(v1) < libc.Int32FromUint16(iStart)) { + if !(v1 < iStart) { break } - if libc.Int32FromUint16(iFreeBlk) <= libc.Int32FromUint16(iPtr) { - if libc.Int32FromUint16(iFreeBlk) == 0 { + if iFreeBlk <= iPtr { + if iFreeBlk == 0 { break } /* TH3: corrupt082.100 */ - return _sqlite3CorruptError(tls, int32(72726)) + return _sqlite3CorruptError(tls, int32(73493)) } iPtr = iFreeBlk } - if uint32(iFreeBlk) > (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-uint32(4) { /* TH3: corrupt081.100 */ - return _sqlite3CorruptError(tls, int32(72731)) + if iFreeBlk > libc.Int32FromUint32((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize)-int32(4) { /* TH3: corrupt081.100 */ + return _sqlite3CorruptError(tls, int32(73498)) } /* At this point: ** iFreeBlk: First freeblock after iStart, or zero if none @@ -47507,70 +47689,70 @@ func _freeSpace(tls *libc.TLS, pPage uintptr, iStart Tu16, iSize Tu16) (r int32) ** ** Check to see if iFreeBlk should be coalesced onto the end of iStart. */ - if iFreeBlk != 0 && iEnd+uint32(3) >= uint32(iFreeBlk) { - nFrag = uint8(uint32(iFreeBlk) - iEnd) - if iEnd > uint32(iFreeBlk) { - return _sqlite3CorruptError(tls, int32(72743)) + if iFreeBlk != 0 && iEnd+int32(3) >= iFreeBlk { + nFrag = iFreeBlk - iEnd + if iEnd > iFreeBlk { + return _sqlite3CorruptError(tls, int32(73510)) } - iEnd = libc.Uint32FromInt32(libc.Int32FromUint16(iFreeBlk) + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iFreeBlk)+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iFreeBlk)+int32(2)) + 1))))) - if iEnd > (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return _sqlite3CorruptError(tls, int32(72746)) + iEnd = iFreeBlk + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk+int32(2)) + 1)))) + if iEnd > libc.Int32FromUint32((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { + return _sqlite3CorruptError(tls, int32(73513)) } - iSize = uint16(iEnd - uint32(iStart)) - iFreeBlk = libc.Uint16FromInt32(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) + iSize = iEnd - iStart + iFreeBlk = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1))) } /* If iPtr is another freeblock (that is, if iPtr is not the freelist ** pointer in the page header) then check to see if iStart should be ** coalesced onto the end of iPtr. */ - if libc.Int32FromUint16(iPtr) > libc.Int32FromUint8(hdr)+int32(1) { - iPtrEnd = libc.Int32FromUint16(iPtr) + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iPtr)+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iPtr)+int32(2)) + 1)))) - if iPtrEnd+int32(3) >= libc.Int32FromUint16(iStart) { - if iPtrEnd > libc.Int32FromUint16(iStart) { - return _sqlite3CorruptError(tls, int32(72759)) + if iPtr > libc.Int32FromUint8(hdr)+int32(1) { + iPtrEnd = iPtr + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr+int32(2)) + 1)))) + if iPtrEnd+int32(3) >= iStart { + if iPtrEnd > iStart { + return _sqlite3CorruptError(tls, int32(73526)) } - nFrag = Tu8(int32(nFrag) + (libc.Int32FromUint16(iStart) - iPtrEnd)) - iSize = uint16(iEnd - uint32(iPtr)) + nFrag += iStart - iPtrEnd + iSize = iEnd - iPtr iStart = iPtr } } - if libc.Int32FromUint8(nFrag) > libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(7))))) { - return _sqlite3CorruptError(tls, int32(72765)) + if nFrag > libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(7))))) { + return _sqlite3CorruptError(tls, int32(73532)) } p2 = data + uintptr(libc.Int32FromUint8(hdr)+int32(7)) - *(*uint8)(unsafe.Pointer(p2)) = uint8(int32(*(*uint8)(unsafe.Pointer(p2))) - libc.Int32FromUint8(nFrag)) + *(*uint8)(unsafe.Pointer(p2)) = uint8(int32(*(*uint8)(unsafe.Pointer(p2))) - libc.Int32FromUint8(libc.Uint8FromInt32(nFrag))) } pTmp = data + uintptr(libc.Int32FromUint8(hdr)+int32(5)) - x = libc.Uint16FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp)))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp + 1)))) + x = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp)))<<int32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp + 1))) if libc.Int32FromUint16((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FbtsFlags)&int32(BTS_FAST_SECURE) != 0 { /* Overwrite deleted information with zeros when the secure_delete ** option is enabled */ - libc.Xmemset(tls, data+uintptr(iStart), 0, uint64(iSize)) + libc.Xmemset(tls, data+uintptr(iStart), 0, libc.Uint64FromInt32(iSize)) } - if libc.Int32FromUint16(iStart) <= libc.Int32FromUint16(x) { + if iStart <= x { /* The new freeblock is at the beginning of the cell content area, ** so just extend the cell content area rather than create another ** freelist entry */ - if libc.Int32FromUint16(iStart) < libc.Int32FromUint16(x) { - return _sqlite3CorruptError(tls, int32(72779)) + if iStart < x { + return _sqlite3CorruptError(tls, int32(73546)) } - if libc.Int32FromUint16(iPtr) != libc.Int32FromUint8(hdr)+int32(1) { - return _sqlite3CorruptError(tls, int32(72780)) + if iPtr != libc.Int32FromUint8(hdr)+int32(1) { + return _sqlite3CorruptError(tls, int32(73547)) } - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)))) = libc.Uint8FromInt32(libc.Int32FromUint16(iFreeBlk) >> libc.Int32FromInt32(8)) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)) + 1)) = uint8(iFreeBlk) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)))) = uint8(iEnd >> libc.Int32FromInt32(8)) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)) + 1)) = uint8(iEnd) + *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)))) = libc.Uint8FromInt32(iFreeBlk >> libc.Int32FromInt32(8)) + *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)) + 1)) = libc.Uint8FromInt32(iFreeBlk) + *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)))) = libc.Uint8FromInt32(iEnd >> libc.Int32FromInt32(8)) + *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)) + 1)) = libc.Uint8FromInt32(iEnd) } else { /* Insert the new freeblock into the freelist */ - *(*uint8)(unsafe.Pointer(data + uintptr(iPtr))) = libc.Uint8FromInt32(libc.Int32FromUint16(iStart) >> libc.Int32FromInt32(8)) - *(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)) = uint8(iStart) - *(*uint8)(unsafe.Pointer(data + uintptr(iStart))) = libc.Uint8FromInt32(libc.Int32FromUint16(iFreeBlk) >> libc.Int32FromInt32(8)) - *(*uint8)(unsafe.Pointer(data + uintptr(iStart) + 1)) = uint8(iFreeBlk) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iStart)+int32(2)))) = libc.Uint8FromInt32(libc.Int32FromUint16(iSize) >> libc.Int32FromInt32(8)) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iStart)+int32(2)) + 1)) = uint8(iSize) - } - *(*int32)(unsafe.Pointer(pPage + 20)) += libc.Int32FromUint16(iOrigSize) + *(*uint8)(unsafe.Pointer(data + uintptr(iPtr))) = libc.Uint8FromInt32(iStart >> libc.Int32FromInt32(8)) + *(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)) = libc.Uint8FromInt32(iStart) + *(*uint8)(unsafe.Pointer(data + uintptr(iStart))) = libc.Uint8FromInt32(iFreeBlk >> libc.Int32FromInt32(8)) + *(*uint8)(unsafe.Pointer(data + uintptr(iStart) + 1)) = libc.Uint8FromInt32(iFreeBlk) + *(*uint8)(unsafe.Pointer(data + uintptr(iStart+int32(2)))) = libc.Uint8FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(iSize)) >> libc.Int32FromInt32(8)) + *(*uint8)(unsafe.Pointer(data + uintptr(iStart+int32(2)) + 1)) = uint8(libc.Uint16FromInt32(iSize)) + } + *(*int32)(unsafe.Pointer(pPage + 20)) += iOrigSize return SQLITE_OK } @@ -47616,7 +47798,7 @@ func _decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) (r int32) { (*TMemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = uint8(0) (*TMemPage)(unsafe.Pointer(pPage)).FxCellSize = __ccgo_fp(_cellSizePtrIdxLeaf) (*TMemPage)(unsafe.Pointer(pPage)).FxParseCell = __ccgo_fp(_btreeParseCellPtrIndex) - return _sqlite3CorruptError(tls, int32(72834)) + return _sqlite3CorruptError(tls, int32(73602)) } } } else { @@ -47642,7 +47824,7 @@ func _decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) (r int32) { (*TMemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = uint8(0) (*TMemPage)(unsafe.Pointer(pPage)).FxCellSize = __ccgo_fp(_cellSizePtr) (*TMemPage)(unsafe.Pointer(pPage)).FxParseCell = __ccgo_fp(_btreeParseCellPtrIndex) - return _sqlite3CorruptError(tls, int32(72858)) + return _sqlite3CorruptError(tls, int32(73626)) } } } @@ -47681,12 +47863,12 @@ func _btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) (r int32) { /* EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will ** always be at least one cell before the first freeblock. */ - return _sqlite3CorruptError(tls, int32(72909)) + return _sqlite3CorruptError(tls, int32(73677)) } for int32(1) != 0 { if pc > iCellLast { /* Freeblock off the end of the page */ - return _sqlite3CorruptError(tls, int32(72914)) + return _sqlite3CorruptError(tls, int32(73682)) } next = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc+int32(2)))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc+int32(2)) + 1)))) @@ -47698,11 +47880,11 @@ func _btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) (r int32) { } if next > uint32(0) { /* Freeblock not in ascending order */ - return _sqlite3CorruptError(tls, int32(72924)) + return _sqlite3CorruptError(tls, int32(73692)) } if libc.Uint32FromInt32(pc)+size > libc.Uint32FromInt32(usableSize) { /* Last freeblock extends past page end */ - return _sqlite3CorruptError(tls, int32(72928)) + return _sqlite3CorruptError(tls, int32(73696)) } } /* At this point, nFree contains the sum of the offset to the start @@ -47713,7 +47895,7 @@ func _btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) (r int32) { ** area, according to the page header, lies within the page. */ if nFree > usableSize || nFree < iCellFirst { - return _sqlite3CorruptError(tls, int32(72940)) + return _sqlite3CorruptError(tls, int32(73708)) } (*TMemPage)(unsafe.Pointer(pPage)).FnFree = libc.Int32FromUint16(libc.Uint16FromInt32(nFree - iCellFirst)) return SQLITE_OK @@ -47744,11 +47926,11 @@ func _btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) (r int32) { } pc = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(cellOffset+i*int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(cellOffset+i*int32(2)) + 1))) if pc < iCellFirst || pc > iCellLast { - return _sqlite3CorruptError(tls, int32(72971)) + return _sqlite3CorruptError(tls, int32(73739)) } sz = libc.Int32FromUint16((*(*func(*libc.TLS, uintptr, uintptr) Tu16)(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxCellSize})))(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return _sqlite3CorruptError(tls, int32(72976)) + return _sqlite3CorruptError(tls, int32(73744)) } goto _1 _1: @@ -47777,11 +47959,11 @@ func _btreeInitPage(tls *libc.TLS, pPage uintptr) (r int32) { /* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating ** the b-tree page type. */ if _decodeFlags(tls, pPage, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data)))) != 0 { - return _sqlite3CorruptError(tls, int32(73008)) + return _sqlite3CorruptError(tls, int32(73776)) } (*TMemPage)(unsafe.Pointer(pPage)).FmaskPage = uint16((*TBtShared)(unsafe.Pointer(pBt)).FpageSize - libc.Uint32FromInt32(1)) (*TMemPage)(unsafe.Pointer(pPage)).FnOverflow = uint8(0) - (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = libc.Uint16FromInt32(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset) + int32(8) + libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) + (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = libc.Uint16FromInt32(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset) + libc.Int32FromInt32(8) + libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*TMemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*TBtShared)(unsafe.Pointer(pBt)).FpageSize) (*TMemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*TMemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize) @@ -47790,7 +47972,7 @@ func _btreeInitPage(tls *libc.TLS, pPage uintptr) (r int32) { (*TMemPage)(unsafe.Pointer(pPage)).FnCell = libc.Uint16FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + 3)))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + 3 + 1)))) if uint32((*TMemPage)(unsafe.Pointer(pPage)).FnCell) > ((*TBtShared)(unsafe.Pointer(pBt)).FpageSize-uint32(8))/uint32(6) { /* To many cells for a single page. The page must be corrupt */ - return _sqlite3CorruptError(tls, int32(73022)) + return _sqlite3CorruptError(tls, int32(73790)) } /* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only ** possible for a root page of a table that contains no rows) then the @@ -47812,15 +47994,13 @@ func _btreeInitPage(tls *libc.TLS, pPage uintptr) (r int32) { // */ func _zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { var data, pBt uintptr - var first Tu16 - var hdr Tu8 - var v1 int32 + var first, hdr, v1 int32 _, _, _, _, _ = data, first, hdr, pBt, v1 data = (*TMemPage)(unsafe.Pointer(pPage)).FaData pBt = (*TMemPage)(unsafe.Pointer(pPage)).FpBt - hdr = (*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset + hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset) if libc.Int32FromUint16((*TBtShared)(unsafe.Pointer(pBt)).FbtsFlags)&int32(BTS_FAST_SECURE) != 0 { - libc.Xmemset(tls, data+uintptr(hdr), 0, uint64((*TBtShared)(unsafe.Pointer(pBt)).FusableSize-uint32(hdr))) + libc.Xmemset(tls, data+uintptr(hdr), 0, uint64((*TBtShared)(unsafe.Pointer(pBt)).FusableSize-libc.Uint32FromInt32(hdr))) } *(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = libc.Uint8FromInt8(int8(flags)) if flags&int32(PTF_LEAF) == 0 { @@ -47828,14 +48008,14 @@ func _zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { } else { v1 = int32(8) } - first = libc.Uint16FromInt32(libc.Int32FromUint8(hdr) + v1) - libc.Xmemset(tls, data+uintptr(libc.Int32FromUint8(hdr)+int32(1)), 0, uint64(4)) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(7)))) = uint8(0) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)))) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize >> libc.Int32FromInt32(8)) - *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)) + 1)) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize) - (*TMemPage)(unsafe.Pointer(pPage)).FnFree = libc.Int32FromUint16(uint16((*TBtShared)(unsafe.Pointer(pBt)).FusableSize - uint32(first))) + first = hdr + v1 + libc.Xmemset(tls, data+uintptr(hdr+int32(1)), 0, uint64(4)) + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(7)))) = uint8(0) + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize >> libc.Int32FromInt32(8)) + *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1)) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize) + (*TMemPage)(unsafe.Pointer(pPage)).FnFree = libc.Int32FromUint16(uint16((*TBtShared)(unsafe.Pointer(pBt)).FusableSize - libc.Uint32FromInt32(first))) _decodeFlags(tls, pPage, flags) - (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = first + (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = libc.Uint16FromInt32(first) (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*TBtShared)(unsafe.Pointer(pBt)).FpageSize) (*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*TMemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize) @@ -47943,7 +48123,7 @@ func _getAndInitPage(tls *libc.TLS, pBt uintptr, pgno TPgno, ppPage uintptr, bRe _, _ = pPage, rc if pgno > _btreePagecount(tls, pBt) { *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return _sqlite3CorruptError(tls, int32(73165)) + return _sqlite3CorruptError(tls, int32(73933)) } rc = _sqlite3PagerGet(tls, (*TBtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, bReadOnly) if rc != 0 { @@ -48005,7 +48185,7 @@ func _btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno TPgno, ppPage uintptr, if _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > int32(1) { _releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return _sqlite3CorruptError(tls, int32(73237)) + return _sqlite3CorruptError(tls, int32(74005)) } (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = uint8(0) } else { @@ -48093,7 +48273,7 @@ func _sqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt /* Set the variable isMemdb to true for an in-memory database, or ** false for a file-based database. */ - isMemdb = libc.BoolInt32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, __ccgo_ts+4257) == 0 || isTempDb != 0 && _sqlite3TempInMemory(tls, db) != 0 || vfsFlags&int32(SQLITE_OPEN_MEMORY) != 0) + isMemdb = libc.BoolInt32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, __ccgo_ts+4283) == 0 || isTempDb != 0 && _sqlite3TempInMemory(tls, db) != 0 || vfsFlags&int32(SQLITE_OPEN_MEMORY) != 0) /* flags fit in 8 bits */ /* Only a BTREE_SINGLE database can be BTREE_UNORDERED */ /* A BTREE_SINGLE database is always a temporary and/or ephemeral */ @@ -48717,7 +48897,7 @@ func _sqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) (r int32 p1 = (*TBtree)(unsafe.Pointer(p)).FpBt + 40 *(*Tu16)(unsafe.Pointer(p1)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p1))) & ^libc.Int32FromInt32(BTS_FAST_SECURE)) p2 = (*TBtree)(unsafe.Pointer(p)).FpBt + 40 - *(*Tu16)(unsafe.Pointer(p2)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p2))) | libc.Int32FromInt32(BTS_SECURE_DELETE)*newFlag) + *(*Tu16)(unsafe.Pointer(p2)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p2))) | libc.Int32FromUint16(libc.Uint16FromInt32(libc.Int32FromInt32(BTS_SECURE_DELETE)*newFlag))) } b = libc.Int32FromUint16((*TBtShared)(unsafe.Pointer((*TBtree)(unsafe.Pointer(p)).FpBt)).FbtsFlags) & int32(BTS_FAST_SECURE) / int32(BTS_SECURE_DELETE) _sqlite3BtreeLeave(tls, p) @@ -48879,7 +49059,7 @@ func _lockBtree(tls *libc.TLS, pBt uintptr) (r int32) { ** The original design allowed these amounts to vary, but as of ** version 3.6.0, we require them to be fixed. */ - if libc.Xmemcmp(tls, page1+21, __ccgo_ts+4266, uint64(3)) != 0 { + if libc.Xmemcmp(tls, page1+21, __ccgo_ts+4292, uint64(3)) != 0 { goto page1_init_failed } /* EVIDENCE-OF: R-51873-39618 The page size for a database file is @@ -48917,7 +49097,7 @@ func _lockBtree(tls *libc.TLS, pBt uintptr) (r int32) { } if nPage > *(*Tu32)(unsafe.Pointer(bp + 8)) { if _sqlite3WritableSchema(tls, (*TBtShared)(unsafe.Pointer(pBt)).Fdb) == 0 { - rc = _sqlite3CorruptError(tls, int32(74175)) + rc = _sqlite3CorruptError(tls, int32(74943)) goto page1_init_failed } else { nPage = *(*Tu32)(unsafe.Pointer(bp + 8)) @@ -49358,7 +49538,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT if libc.Int32FromUint8(eType) == int32(PTRMAP_OVERFLOW2) { /* The pointer is always the first 4 bytes of the page in this case. */ if _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return _sqlite3CorruptError(tls, int32(74623)) + return _sqlite3CorruptError(tls, int32(75398)) } _sqlite3Put4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -49382,7 +49562,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxParseCell})))(tls, pPage, pCell, bp) if uint32((*(*TCellInfo)(unsafe.Pointer(bp))).FnLocal) < (*(*TCellInfo)(unsafe.Pointer(bp))).FnPayload { if pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize) > (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return _sqlite3CorruptError(tls, int32(74642)) + return _sqlite3CorruptError(tls, int32(75417)) } if iFrom == _sqlite3Get4byte(tls, pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize)-uintptr(4)) { _sqlite3Put4byte(tls, pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize)-uintptr(4), iTo) @@ -49391,7 +49571,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT } } else { if pCell+uintptr(4) > (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return _sqlite3CorruptError(tls, int32(74651)) + return _sqlite3CorruptError(tls, int32(75426)) } if _sqlite3Get4byte(tls, pCell) == iFrom { _sqlite3Put4byte(tls, pCell, iTo) @@ -49405,7 +49585,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT } if i == nCell { if libc.Int32FromUint8(eType) != int32(PTRMAP_BTREE) || _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)+int32(8))) != iFrom { - return _sqlite3CorruptError(tls, int32(74663)) + return _sqlite3CorruptError(tls, int32(75438)) } _sqlite3Put4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)+int32(8)), iTo) } @@ -49435,7 +49615,7 @@ func _relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType Tu8, iPtrP iDbPage = (*TMemPage)(unsafe.Pointer(pDbPage)).Fpgno pPager = (*TBtShared)(unsafe.Pointer(pBt)).FpPager if iDbPage < uint32(3) { - return _sqlite3CorruptError(tls, int32(74698)) + return _sqlite3CorruptError(tls, int32(75473)) } /* Move page iDbPage from its current location to page number iFreePage */ *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3PagerMovepage(tls, pPager, (*TMemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) @@ -49531,7 +49711,7 @@ func _incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin TPgno, iLastPg TPgno, bCom return rc } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))) == int32(PTRMAP_ROOTPAGE) { - return _sqlite3CorruptError(tls, int32(74796)) + return _sqlite3CorruptError(tls, int32(75571)) } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))) == int32(PTRMAP_FREEPAGE) { if bCommit == 0 { @@ -49569,7 +49749,7 @@ func _incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin TPgno, iLastPg TPgno, bCom _releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) if *(*TPgno)(unsafe.Pointer(bp + 24)) > dbSize { _releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) - return _sqlite3CorruptError(tls, int32(74848)) + return _sqlite3CorruptError(tls, int32(75623)) } } rc = _relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 32)), *(*Tu8)(unsafe.Pointer(bp)), *(*TPgno)(unsafe.Pointer(bp + 4)), *(*TPgno)(unsafe.Pointer(bp + 24)), bCommit) @@ -49636,7 +49816,7 @@ func _sqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) (r int32) { nFree = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) nFin = _finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = _sqlite3CorruptError(tls, int32(74916)) + rc = _sqlite3CorruptError(tls, int32(75691)) } else { if nFree > uint32(0) { rc = _saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -49679,7 +49859,7 @@ func _autoVacuumCommit(tls *libc.TLS, p uintptr) (r int32) { ** is either a pointer-map page or the pending-byte page. If one ** is encountered, this indicates corruption. */ - return _sqlite3CorruptError(tls, int32(74967)) + return _sqlite3CorruptError(tls, int32(75742)) } nFree = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) db = (*TBtree)(unsafe.Pointer(p)).Fdb @@ -49709,7 +49889,7 @@ func _autoVacuumCommit(tls *libc.TLS, p uintptr) (r int32) { } nFin = _finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return _sqlite3CorruptError(tls, int32(74994)) + return _sqlite3CorruptError(tls, int32(75769)) } if nFin < nOrig { rc = _saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -50175,7 +50355,7 @@ func _btreeCursor(tls *libc.TLS, p uintptr, iTable TPgno, wrFlag int32, pKeyInfo /* Assert that the caller has opened the required transaction. */ if iTable <= uint32(1) { if iTable < uint32(1) { - return _sqlite3CorruptError(tls, int32(75458)) + return _sqlite3CorruptError(tls, int32(76233)) } else { if _btreePagecount(tls, pBt) == uint32(0) { iTable = uint32(0) @@ -50567,7 +50747,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin pBt = (*TBtCursor)(unsafe.Pointer(pCur)).FpBt /* Btree this cursor belongs to */ pBufStart = pBuf /* Start of original out buffer */ if libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Fix) >= libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) { - return _sqlite3CorruptError(tls, int32(75882)) + return _sqlite3CorruptError(tls, int32(76657)) } _getCellInfo(tls, pCur) aPayload = (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload @@ -50577,7 +50757,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin ** &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] ** but is recast into its current form to avoid integer overflow problems */ - return _sqlite3CorruptError(tls, int32(75897)) + return _sqlite3CorruptError(tls, int32(76672)) } /* Check if data must be read/written to/from the btree page itself. */ if offset < uint32((*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { @@ -50634,7 +50814,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin for *(*TPgno)(unsafe.Pointer(bp)) != 0 { /* If required, populate the overflow page-list cache. */ if *(*TPgno)(unsafe.Pointer(bp)) > (*TBtShared)(unsafe.Pointer(pBt)).FnPage { - return _sqlite3CorruptError(tls, int32(75968)) + return _sqlite3CorruptError(tls, int32(76743)) } *(*TPgno)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*TPgno)(unsafe.Pointer(bp)) if offset >= ovflSize { @@ -50708,7 +50888,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin } if rc == SQLITE_OK && amt > uint32(0) { /* Overflow chain ends prematurely */ - return _sqlite3CorruptError(tls, int32(76052)) + return _sqlite3CorruptError(tls, int32(76827)) } return rc } @@ -50843,7 +51023,7 @@ func _moveToChild(tls *libc.TLS, pCur uintptr, newPgno Tu32) (r int32) { var v3, p1 uintptr _, _, _, _ = rc, v2, v3, p1 if int32((*TBtCursor)(unsafe.Pointer(pCur)).FiPage) >= libc.Int32FromInt32(BTCURSOR_MAX_DEPTH)-libc.Int32FromInt32(1) { - return _sqlite3CorruptError(tls, int32(76190)) + return _sqlite3CorruptError(tls, int32(76965)) } (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = uint16(0) p1 = pCur + 1 @@ -50855,7 +51035,7 @@ func _moveToChild(tls *libc.TLS, pCur uintptr, newPgno Tu32) (r int32) { rc = _getAndInitPage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+136, libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if rc == SQLITE_OK && (libc.Int32FromUint16((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) < int32(1) || libc.Int32FromUint8((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FintKey) != libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurIntKey)) { _releasePage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpPage) - rc = _sqlite3CorruptError(tls, int32(76204)) + rc = _sqlite3CorruptError(tls, int32(76979)) } if rc != 0 { v3 = pCur + 84 @@ -50971,7 +51151,7 @@ func _moveToRoot(tls *libc.TLS, pCur uintptr) (r int32) { ** in such a way that page pRoot is linked into a second b-tree table ** (or the freelist). */ if libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.BoolInt32((*TBtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pRoot)).FintKey) { - return _sqlite3CorruptError(tls, int32(76339)) + return _sqlite3CorruptError(tls, int32(77114)) } goto skip_init skip_init: @@ -50985,7 +51165,7 @@ skip_init: } else { if !((*TMemPage)(unsafe.Pointer(pRoot)).Fleaf != 0) { if (*TMemPage)(unsafe.Pointer(pRoot)).Fpgno != uint32(1) { - return _sqlite3CorruptError(tls, int32(76351)) + return _sqlite3CorruptError(tls, int32(77126)) } subpage = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+int32(8))) (*TBtCursor)(unsafe.Pointer(pCur)).FeState = uint8(CURSOR_VALID) @@ -51219,7 +51399,7 @@ func _sqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey Ti64, biasRigh break } if pCell >= (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return _sqlite3CorruptError(tls, int32(76600)) + return _sqlite3CorruptError(tls, int32(77375)) } } } @@ -51423,7 +51603,7 @@ func _sqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes p3 = pCur + 1 *(*Tu8)(unsafe.Pointer(p3)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p3))) & ^(libc.Int32FromInt32(BTCF_ValidOvfl) | libc.Int32FromInt32(BTCF_AtLast))) if !((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit != 0) { - return _sqlite3CorruptError(tls, int32(76796)) + return _sqlite3CorruptError(tls, int32(77571)) } goto bypass_moveto_root /* Start search on the current page */ } @@ -51486,10 +51666,10 @@ bypass_moveto_root: /* Invalid key size: 0x80 0x80 0x01 */ /* Minimum legal index key size */ if nCell < int32(2) || libc.Uint32FromInt32(nCell)/(*TBtShared)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*TBtShared)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage { - rc = _sqlite3CorruptError(tls, int32(76883)) + rc = _sqlite3CorruptError(tls, int32(77658)) goto moveto_index_finish } - pCellKey = _sqlite3Malloc(tls, libc.Uint64FromInt32(nCell+nOverrun)) + pCellKey = _sqlite3Malloc(tls, libc.Uint64FromInt32(nCell)+libc.Uint64FromInt32(nOverrun)) if pCellKey == uintptr(0) { rc = int32(SQLITE_NOMEM) goto moveto_index_finish @@ -51517,7 +51697,7 @@ bypass_moveto_root: rc = SQLITE_OK (*TBtCursor)(unsafe.Pointer(pCur)).Fix = libc.Uint16FromInt32(idx) if (*TUnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0 { - rc = _sqlite3CorruptError(tls, int32(76915)) + rc = _sqlite3CorruptError(tls, int32(77690)) } goto moveto_index_finish } @@ -51550,7 +51730,7 @@ bypass_moveto_root: p9 = pCur + 1 *(*Tu8)(unsafe.Pointer(p9)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p9))) & ^(libc.Int32FromInt32(BTCF_ValidNKey) | libc.Int32FromInt32(BTCF_ValidOvfl))) if int32((*TBtCursor)(unsafe.Pointer(pCur)).FiPage) >= libc.Int32FromInt32(BTCURSOR_MAX_DEPTH)-libc.Int32FromInt32(1) { - return _sqlite3CorruptError(tls, int32(76946)) + return _sqlite3CorruptError(tls, int32(77721)) } *(*Tu16)(unsafe.Pointer(pCur + 88 + uintptr((*TBtCursor)(unsafe.Pointer(pCur)).FiPage)*2)) = libc.Uint16FromInt32(lwr) *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*TBtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) = (*TBtCursor)(unsafe.Pointer(pCur)).FpPage @@ -51559,7 +51739,7 @@ bypass_moveto_root: rc = _getAndInitPage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpBt, chldPg, pCur+136, libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if rc == SQLITE_OK && (libc.Int32FromUint16((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) < int32(1) || libc.Int32FromUint8((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FintKey) != libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurIntKey)) { _releasePage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpPage) - rc = _sqlite3CorruptError(tls, int32(76957)) + rc = _sqlite3CorruptError(tls, int32(77732)) } if rc != 0 { v11 = pCur + 84 @@ -51688,7 +51868,7 @@ func _btreeNext(tls *libc.TLS, pCur uintptr) (r int32) { (*TMemPage)(unsafe.Pointer(pPage)).FisInit = uint8(0) } if !((*TMemPage)(unsafe.Pointer(pPage)).FisInit != 0) { - return _sqlite3CorruptError(tls, int32(77058)) + return _sqlite3CorruptError(tls, int32(77833)) } if idx >= libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) { if !((*TMemPage)(unsafe.Pointer(pPage)).Fleaf != 0) { @@ -51798,7 +51978,7 @@ func _btreePrevious(tls *libc.TLS, pCur uintptr) (r int32) { (*TMemPage)(unsafe.Pointer(pPage)).FisInit = uint8(0) } if !((*TMemPage)(unsafe.Pointer(pPage)).FisInit != 0) { - return _sqlite3CorruptError(tls, int32(77151)) + return _sqlite3CorruptError(tls, int32(77926)) } if !((*TMemPage)(unsafe.Pointer(pPage)).Fleaf != 0) { idx = libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Fix) @@ -51886,7 +52066,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt ** stores the total number of pages on the freelist. */ n = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage1)).FaData+36) if n >= mxPage { - return _sqlite3CorruptError(tls, int32(77241)) + return _sqlite3CorruptError(tls, int32(78016)) } if n > uint32(0) { searchList = uint8(0) /* If the free-list must be searched for 'nearby' */ @@ -51941,7 +52121,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt nSearch++ } if v2 || v1 > n { - rc = _sqlite3CorruptError(tls, int32(77297)) + rc = _sqlite3CorruptError(tls, int32(78072)) } else { rc = _btreeGetUnusedPage(tls, pBt, iTrunk, bp, 0) } @@ -51967,7 +52147,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt } else { if k > (*TBtShared)(unsafe.Pointer(pBt)).FusableSize/libc.Uint32FromInt32(4)-libc.Uint32FromInt32(2) { /* Value of k is out of range. Database corruption */ - rc = _sqlite3CorruptError(tls, int32(77326)) + rc = _sqlite3CorruptError(tls, int32(78101)) goto end_allocate_page } else { if searchList != 0 && (nearby == iTrunk || iTrunk < nearby && libc.Int32FromUint8(eMode) == int32(BTALLOC_LE)) { @@ -51994,7 +52174,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt } else { iNewTrunk = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+8) if iNewTrunk > mxPage { - rc = _sqlite3CorruptError(tls, int32(77360)) + rc = _sqlite3CorruptError(tls, int32(78135)) goto end_allocate_page } rc = _btreeGetUnusedPage(tls, pBt, iNewTrunk, bp+16, 0) @@ -52065,7 +52245,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt } iPage = _sqlite3Get4byte(tls, aData+uintptr(uint32(8)+closest*uint32(4))) if iPage > mxPage || iPage < uint32(2) { - rc = _sqlite3CorruptError(tls, int32(77425)) + rc = _sqlite3CorruptError(tls, int32(78200)) goto end_allocate_page } if !(searchList != 0) || (iPage == nearby || iPage < nearby && libc.Int32FromUint8(eMode) == int32(BTALLOC_LE)) { @@ -52203,7 +52383,7 @@ func _freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage TPgno) (r in iTrunk = uint32(0) /* Page number of free-list trunk page */ pPage1 = (*TBtShared)(unsafe.Pointer(pBt)).FpPage1 /* Initial number of pages on free-list */ if iPage < uint32(2) || iPage > (*TBtShared)(unsafe.Pointer(pBt)).FnPage { - return _sqlite3CorruptError(tls, int32(77552)) + return _sqlite3CorruptError(tls, int32(78327)) } if pMemPage != 0 { *(*uintptr)(unsafe.Pointer(bp + 8)) = pMemPage @@ -52254,7 +52434,7 @@ func _freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage TPgno) (r in if nFree != uint32(0) { /* Initial number of leaf cells on trunk page */ iTrunk = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage1)).FaData+32) if iTrunk > _btreePagecount(tls, pBt) { - *(*int32)(unsafe.Pointer(bp + 16)) = _sqlite3CorruptError(tls, int32(77599)) + *(*int32)(unsafe.Pointer(bp + 16)) = _sqlite3CorruptError(tls, int32(78374)) goto freepage_out } *(*int32)(unsafe.Pointer(bp + 16)) = _btreeGetPage(tls, pBt, iTrunk, bp, 0) @@ -52263,7 +52443,7 @@ func _freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage TPgno) (r in } nLeaf = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+4) if nLeaf > (*TBtShared)(unsafe.Pointer(pBt)).FusableSize/uint32(4)-uint32(2) { - *(*int32)(unsafe.Pointer(bp + 16)) = _sqlite3CorruptError(tls, int32(77610)) + *(*int32)(unsafe.Pointer(bp + 16)) = _sqlite3CorruptError(tls, int32(78385)) goto freepage_out } if nLeaf < (*TBtShared)(unsafe.Pointer(pBt)).FusableSize/uint32(4)-uint32(8) { @@ -52353,7 +52533,7 @@ func _clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp _, _, _, _, _, _, _, _ = nOvfl, ovflPageSize, ovflPgno, pBt, rc, v1, v2, v3 if pCell+uintptr((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd { /* Cell extends past end of page */ - return _sqlite3CorruptError(tls, int32(77699)) + return _sqlite3CorruptError(tls, int32(78474)) } ovflPgno = _sqlite3Get4byte(tls, pCell+uintptr((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*TMemPage)(unsafe.Pointer(pPage)).FpBt @@ -52371,7 +52551,7 @@ func _clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp /* 0 is not a legal page number and page 1 cannot be an ** overflow page. Therefore if ovflPgno<2 or past the end of the ** file the database must be corrupt. */ - return _sqlite3CorruptError(tls, int32(77716)) + return _sqlite3CorruptError(tls, int32(78491)) } if nOvfl != 0 { rc = _getOverflowPage(tls, pBt, ovflPgno, bp+8, bp) @@ -52394,7 +52574,7 @@ func _clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp ** caller is iterating through or using in some other way, this ** can be problematic. */ - rc = _sqlite3CorruptError(tls, int32(77736)) + rc = _sqlite3CorruptError(tls, int32(78511)) } else { rc = _freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 8)), ovflPgno) } @@ -52615,10 +52795,10 @@ func _dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { pc = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(ptr)))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(ptr + 1)))) hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+libc.Uint32FromInt32(sz) > (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(77992)) + *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(78767)) return } - rc = _freeSpace(tls, pPage, uint16(pc), libc.Uint16FromInt32(sz)) + rc = _freeSpace(tls, pPage, libc.Int32FromUint32(pc), sz) if rc != 0 { *(*int32)(unsafe.Pointer(pRC)) = rc return @@ -53009,12 +53189,12 @@ func _rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg sz = *(*Tu16)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2)) if uint64(pCell) >= uint64(aData+uintptr(j)) && uint64(pCell) < uint64(pEnd) { if uint64(pCell+uintptr(sz)) > uint64(pEnd) { - return _sqlite3CorruptError(tls, int32(78382)) + return _sqlite3CorruptError(tls, int32(79157)) } pCell = pTmp + uintptr(int64(pCell)-int64(aData)) } else { if uint64(pCell+uintptr(sz)) > uint64(pSrcEnd) && uint64(pCell) < uint64(pSrcEnd) { - return _sqlite3CorruptError(tls, int32(78387)) + return _sqlite3CorruptError(tls, int32(79162)) } } pData -= uintptr(sz) @@ -53022,7 +53202,7 @@ func _rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*Tu8)(unsafe.Pointer(pCellptr + 1)) = libc.Uint8FromInt64(int64(pData) - int64(aData)) pCellptr += uintptr(2) if pData < pCellptr { - return _sqlite3CorruptError(tls, int32(78393)) + return _sqlite3CorruptError(tls, int32(79168)) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) i++ @@ -53117,7 +53297,7 @@ func _pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr ** database. But they might for a corrupt database. Hence use memmove() ** since memcpy() sends SIGABORT with overlapping buffers on OpenBSD */ if uint64(*(*uintptr)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > uint64(pEnd) && uint64(*(*uintptr)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < uint64(pEnd) { - _sqlite3CorruptError(tls, int32(78479)) + _sqlite3CorruptError(tls, int32(79255)) return int32(1) } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), libc.Uint64FromInt32(sz)) @@ -53198,7 +53378,7 @@ func _pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArr if !(j < nFree) { break } - _freeSpace(tls, pPg, libc.Uint16FromInt32(aOfst[j]), libc.Uint16FromInt32(aAfter[j]-aOfst[j])) + _freeSpace(tls, pPg, aOfst[j], aAfter[j]-aOfst[j]) goto _3 _3: ; @@ -53225,7 +53405,7 @@ func _pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArr if !(j < nFree) { break } - _freeSpace(tls, pPg, libc.Uint16FromInt32(aOfst[j]), libc.Uint16FromInt32(aAfter[j]-aOfst[j])) + _freeSpace(tls, pPg, aOfst[j], aAfter[j]-aOfst[j]) goto _4 _4: ; @@ -53265,7 +53445,7 @@ func _editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, p if iOld < iNew { nShift = _pageFreeArray(tls, pPg, iOld, iNew-iOld, pCArray) if nShift > nCell { - return _sqlite3CorruptError(tls, int32(78601)) + return _sqlite3CorruptError(tls, int32(79377)) } libc.Xmemmove(tls, (*TMemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*TMemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*int32(2)), libc.Uint64FromInt32(nCell*int32(2))) nCell -= nShift @@ -53336,7 +53516,7 @@ editpage_fail: ; /* Unable to edit this page. Rebuild it from scratch instead. */ if nNew < int32(1) { - return _sqlite3CorruptError(tls, int32(78675)) + return _sqlite3CorruptError(tls, int32(79455)) } _populateCellCache(tls, pCArray, iNew, nNew) return _rebuildPage(tls, pCArray, iNew, nNew, pPg) @@ -53381,7 +53561,7 @@ func _balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintpt _, _, _, _, _, _, _ = pBt, pOut, pStop, v1, v2, v3, v4 pBt = (*TMemPage)(unsafe.Pointer(pPage)).FpBt /* Page number of pNew */ if libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return _sqlite3CorruptError(tls, int32(78715)) + return _sqlite3CorruptError(tls, int32(79495)) } /* dbfuzz001.test */ /* Allocate a new page. This page will become the right-sibling of ** pPage. Make the parent page writable, so that the new divider cell @@ -53577,10 +53757,11 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa var aPgno [5]TPgno var apDiv [2]uintptr var cntNew, cntOld [5]int32 - var cntOldNext, d, i, iB, iNew, iNew1, iOff, iOld, iOld1, iOvflSpace, iPg, iSpace1, j, k, leafData, limit, nMaxCells, nNew, nNewCell, nOld, nxDiv, pageFlags, r, sz1, sz2, szD, szLeft, szR, szRight, szScratch, usableSpace, v1, v10, v12, v15, v26, v30, v31, v32, v5, v7 int32 + var cntOldNext, d, i, iB, iNew, iNew1, iOff, iOld, iOld1, iOvflSpace, iPg, iSpace1, j, k, leafData, limit, nMaxCells, nNew, nNewCell, nOld, nxDiv, pageFlags, r, sz1, sz2, szD, szLeft, szR, szRight, usableSpace, v1, v10, v12, v15, v26, v30, v31, v32, v5, v7 int32 var fgA, fgB, leafCorrection, maskPage, sz Tu16 var key Tu32 var pgnoA, pgnoB, pgnoTemp TPgno + var szScratch Tu64 var v13, v14 bool var v18 uint32 var _ /* abDone at bp+100 */ [5]Tu8 @@ -53703,8 +53884,8 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa /* ** Allocate space for memory structures */ - szScratch = libc.Int32FromUint64(libc.Uint64FromInt32(nMaxCells)*uint64(8) + libc.Uint64FromInt32(nMaxCells)*uint64(2) + uint64((*TBtShared)(unsafe.Pointer(pBt)).FpageSize)) /* aSpace1 */ - (*(*TCellArray)(unsafe.Pointer(bp + 112))).FapCell = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt32(szScratch)) + szScratch = uint64(libc.Uint64FromInt32(nMaxCells)*uint64(8) + libc.Uint64FromInt32(nMaxCells)*uint64(2) + uint64((*TBtShared)(unsafe.Pointer(pBt)).FpageSize)) /* aSpace1 */ + (*(*TCellArray)(unsafe.Pointer(bp + 112))).FapCell = _sqlite3DbMallocRaw(tls, uintptr(0), szScratch) if (*(*TCellArray)(unsafe.Pointer(bp + 112))).FapCell == uintptr(0) { *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM) goto balance_cleanup @@ -53744,7 +53925,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa ** table-interior, index-leaf, or index-interior). */ if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pOld)).FaData))) != libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer((*(*[3]uintptr)(unsafe.Pointer(bp + 8)))[0])).FaData))) { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79139)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79919)) goto balance_cleanup } /* Load b.apCell[] with pointers to all cells in pOld. If pOld @@ -53767,7 +53948,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa libc.Xmemset(tls, (*(*TCellArray)(unsafe.Pointer(bp + 112))).FszCell+uintptr((*(*TCellArray)(unsafe.Pointer(bp + 112))).FnCell)*2, 0, uint64(2)*libc.Uint64FromInt32(limit+libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pOld)).FnOverflow))) if libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pOld)).FnOverflow) > 0 { if limit < libc.Int32FromUint16(*(*Tu16)(unsafe.Pointer(pOld + 28))) { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79163)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79943)) goto balance_cleanup } limit = libc.Int32FromUint16(*(*Tu16)(unsafe.Pointer(pOld + 28))) @@ -53898,7 +54079,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa if i+int32(1) >= k { k = i + int32(2) if k > libc.Int32FromInt32(NB)+libc.Int32FromInt32(2) { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79264)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80044)) goto balance_cleanup } (*(*[5]int32)(unsafe.Pointer(bp + 72)))[k-int32(1)] = 0 @@ -53941,7 +54122,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa v10 = 0 } if cntNew[i] <= v10 { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79297)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80077)) goto balance_cleanup } } @@ -54000,7 +54181,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa v15 = 0 } if cntNew[i-int32(1)] <= v15 { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79341)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80121)) goto balance_cleanup } goto _11 @@ -54032,7 +54213,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa *(*int32)(unsafe.Pointer(bp)) = _sqlite3PagerWrite(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216)))).FpDbPage) nNew++ if _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216)))).FpDbPage) != int32(1)+libc.BoolInt32(i == iParentIdx-nxDiv) && *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79374)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80154)) } if *(*int32)(unsafe.Pointer(bp)) != 0 { goto balance_cleanup @@ -54262,7 +54443,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa } pSrcEnd = *(*uintptr)(unsafe.Pointer(bp + 112 + 32 + uintptr(k)*8)) if uint64(pCell1) < uint64(pSrcEnd) && uint64(pCell1+uintptr(sz2)) > uint64(pSrcEnd) { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79575)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80355)) goto balance_cleanup } *(*int32)(unsafe.Pointer(bp)) = _insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*TMemPage)(unsafe.Pointer(pNew2)).Fpgno) @@ -54508,7 +54689,7 @@ func _anotherValidCursor(tls *libc.TLS, pCur uintptr) (r int32) { break } if pOther != pCur && libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*TBtCursor)(unsafe.Pointer(pOther)).FpPage == (*TBtCursor)(unsafe.Pointer(pCur)).FpPage { - return _sqlite3CorruptError(tls, int32(79807)) + return _sqlite3CorruptError(tls, int32(80587)) } goto _1 _1: @@ -54581,7 +54762,7 @@ func _balance(tls *libc.TLS, pCur uintptr) (r int32) { /* The page being written is not a root page, and there is currently ** more than one reference to it. This only happens if the page is one ** of its own ancestor pages. Corruption. */ - rc = _sqlite3CorruptError(tls, int32(79867)) + rc = _sqlite3CorruptError(tls, int32(80647)) } else { pParent = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(iPage-int32(1))*8)) iIdx = libc.Int32FromUint16(*(*Tu16)(unsafe.Pointer(pCur + 88 + uintptr(iPage-int32(1))*2))) @@ -54740,7 +54921,7 @@ func _btreeOverwriteOverflowCell(tls *libc.TLS, pCur uintptr, pX uintptr) (r int return rc } if _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != int32(1) || (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = _sqlite3CorruptError(tls, int32(80031)) + rc = _sqlite3CorruptError(tls, int32(80811)) } else { if libc.Uint32FromInt32(iOffset)+ovflPageSize < libc.Uint32FromInt32(nTotal) { ovflPgno = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) @@ -54771,7 +54952,7 @@ func _btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) (r int32) { nTotal = (*TBtreePayload)(unsafe.Pointer(pX)).FnData + (*TBtreePayload)(unsafe.Pointer(pX)).FnZero /* Total bytes of to write */ pPage = (*TBtCursor)(unsafe.Pointer(pCur)).FpPage /* Page being written */ if (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd || (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TMemPage)(unsafe.Pointer(pPage)).FcellOffset) { - return _sqlite3CorruptError(tls, int32(80059)) + return _sqlite3CorruptError(tls, int32(80839)) } if libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) == nTotal { /* The entire cell is local */ @@ -54856,7 +55037,7 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s ** Which can only happen if the SQLITE_NoSchemaError flag was set when ** the schema was loaded. This cannot be asserted though, as a user might ** set the flag, load the schema, and then unset the flag. */ - return _sqlite3CorruptError(tls, int32(80140)) + return _sqlite3CorruptError(tls, int32(80920)) } } /* Ensure that the cursor is not in the CURSOR_FAULT state and that it @@ -54948,7 +55129,7 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s if (*TMemPage)(unsafe.Pointer(pPage)).FnFree < 0 { if libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FeState) > int32(CURSOR_INVALID) { /* ^^^^^--- due to the moveToRoot() call above */ - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80263)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(81043)) } else { *(*int32)(unsafe.Pointer(bp)) = _btreeComputeFreeSpace(tls, pPage) } @@ -54984,7 +55165,7 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = uint16(0) if *(*int32)(unsafe.Pointer(bp + 4)) == 0 { if idx >= libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) { - return _sqlite3CorruptError(tls, int32(80305)) + return _sqlite3CorruptError(tls, int32(81085)) } *(*int32)(unsafe.Pointer(bp)) = _sqlite3PagerWrite(tls, (*TMemPage)(unsafe.Pointer(pPage)).FpDbPage) if *(*int32)(unsafe.Pointer(bp)) != 0 { @@ -55014,10 +55195,10 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s ** necessary to add the PTRMAP_OVERFLOW1 pointer-map entry. */ /* clearCell never fails when nLocal==nPayload */ if oldCell < (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10) { - return _sqlite3CorruptError(tls, int32(80332)) + return _sqlite3CorruptError(tls, int32(81112)) } if oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 8))) > (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd { - return _sqlite3CorruptError(tls, int32(80335)) + return _sqlite3CorruptError(tls, int32(81115)) } libc.Xmemcpy(tls, oldCell, newCell, libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))) return SQLITE_OK @@ -55135,12 +55316,12 @@ func _sqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey T nIn = uint32((*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return _sqlite3CorruptError(tls, int32(80437)) + return _sqlite3CorruptError(tls, int32(81217)) } nRem = (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < uint32((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { libc.Xmemcpy(tls, aOut, aIn, uint64(nIn)) - (*TBtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(libc.Int64FromUint32(nIn) + (int64(aOut) - int64((*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace))) + (*TBtShared)(unsafe.Pointer(pBt)).FnPreformatSize = libc.Int32FromUint32(nIn + libc.Uint32FromInt32(int32(int64(aOut)-int64((*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace)))) return SQLITE_OK } else { *(*int32)(unsafe.Pointer(bp)) = SQLITE_OK @@ -55150,14 +55331,14 @@ func _sqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey T *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) pPageOut = uintptr(0) /* Size of output buffer aOut[] */ nOut = libc.Uint32FromInt32(_btreePayloadToLocal(tls, (*TBtCursor)(unsafe.Pointer(pDest)).FpPage, libc.Int64FromUint32((*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload))) - (*TBtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(libc.Int64FromUint32(nOut) + (int64(aOut) - int64((*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace))) + (*TBtShared)(unsafe.Pointer(pBt)).FnPreformatSize = libc.Int32FromUint32(nOut) + int32(int64(aOut)-int64((*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace)) if nOut < (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload { pPgnoOut = aOut + uintptr(nOut) *(*int32)(unsafe.Pointer(pBt + 144)) += int32(4) } if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return _sqlite3CorruptError(tls, int32(80462)) + return _sqlite3CorruptError(tls, int32(81242)) } ovflIn = _sqlite3Get4byte(tls, (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -55257,21 +55438,21 @@ func _sqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags Tu8) (r int32) { return *(*int32)(unsafe.Pointer(bp)) } } else { - return _sqlite3CorruptError(tls, int32(80558)) + return _sqlite3CorruptError(tls, int32(81338)) } } iCellDepth = int32((*TBtCursor)(unsafe.Pointer(pCur)).FiPage) iCellIdx = libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*TBtCursor)(unsafe.Pointer(pCur)).FpPage if libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { - return _sqlite3CorruptError(tls, int32(80567)) + return _sqlite3CorruptError(tls, int32(81347)) } pCell = (*TMemPage)(unsafe.Pointer(pPage)).FaData + uintptr(libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FmaskPage)&(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(int32(2)*iCellIdx))))<<libc.Int32FromInt32(8)|libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(int32(2)*iCellIdx) + 1))))) if (*TMemPage)(unsafe.Pointer(pPage)).FnFree < 0 && _btreeComputeFreeSpace(tls, pPage) != 0 { - return _sqlite3CorruptError(tls, int32(80571)) + return _sqlite3CorruptError(tls, int32(81351)) } if pCell < (*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx+uintptr((*TMemPage)(unsafe.Pointer(pPage)).FnCell) { - return _sqlite3CorruptError(tls, int32(80574)) + return _sqlite3CorruptError(tls, int32(81354)) } /* If the BTREE_SAVEPOSITION bit is on, then the cursor position must ** be preserved following this delete operation. If the current delete @@ -55365,7 +55546,7 @@ func _sqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags Tu8) (r int32) { } pCell = (*TMemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(int32(2)*(libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pLeaf)).FnCell)-int32(1))))))<<libc.Int32FromInt32(8)|libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(int32(2)*(libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pLeaf)).FnCell)-int32(1))) + 1))))) if pCell < (*TMemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return _sqlite3CorruptError(tls, int32(80665)) + return _sqlite3CorruptError(tls, int32(81445)) } nCell = libc.Int32FromUint16((*(*func(*libc.TLS, uintptr, uintptr) Tu16)(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pLeaf)).FxCellSize})))(tls, pLeaf, pCell)) pTmp = (*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace @@ -55475,7 +55656,7 @@ func _btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags */ _sqlite3BtreeGetMeta(tls, p, int32(BTREE_LARGEST_ROOT_PAGE), bp+8) if *(*TPgno)(unsafe.Pointer(bp + 8)) > _btreePagecount(tls, pBt) { - return _sqlite3CorruptError(tls, int32(80781)) + return _sqlite3CorruptError(tls, int32(81561)) } *(*TPgno)(unsafe.Pointer(bp + 8))++ /* The new root-page may not be allocated on a pointer-map page, or the @@ -55516,7 +55697,7 @@ func _btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } *(*int32)(unsafe.Pointer(bp + 12)) = _ptrmapGet(tls, pBt, *(*TPgno)(unsafe.Pointer(bp + 8)), bp+32, bp+36) if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp + 32))) == int32(PTRMAP_ROOTPAGE) || libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp + 32))) == int32(PTRMAP_FREEPAGE) { - *(*int32)(unsafe.Pointer(bp + 12)) = _sqlite3CorruptError(tls, int32(80829)) + *(*int32)(unsafe.Pointer(bp + 12)) = _sqlite3CorruptError(tls, int32(81609)) } if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { _releasePage(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -55597,14 +55778,14 @@ func _clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno TPgno, freePageFlag int var _ /* rc at bp+8 */ int32 _, _, _, _ = hdr, i, pCell, v2 if pgno > _btreePagecount(tls, pBt) { - return _sqlite3CorruptError(tls, int32(80919)) + return _sqlite3CorruptError(tls, int32(81699)) } *(*int32)(unsafe.Pointer(bp + 8)) = _getAndInitPage(tls, pBt, pgno, bp, 0) if *(*int32)(unsafe.Pointer(bp + 8)) != 0 { return *(*int32)(unsafe.Pointer(bp + 8)) } if libc.Int32FromUint8((*TBtShared)(unsafe.Pointer(pBt)).FopenFlags)&int32(BTREE_SINGLE) == 0 && _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != int32(1)+libc.BoolInt32(pgno == uint32(1)) { - *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(80926)) + *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(81706)) goto cleardatabasepage_out } hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FhdrOffset) @@ -55741,7 +55922,7 @@ func _btreeDropTable(tls *libc.TLS, p uintptr, iTable TPgno, piMoved uintptr) (r *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) pBt = (*TBtree)(unsafe.Pointer(p)).FpBt if iTable > _btreePagecount(tls, pBt) { - return _sqlite3CorruptError(tls, int32(81030)) + return _sqlite3CorruptError(tls, int32(81810)) } *(*int32)(unsafe.Pointer(bp)) = _sqlite3BtreeClearTable(tls, p, libc.Int32FromUint32(iTable), uintptr(0)) if *(*int32)(unsafe.Pointer(bp)) != 0 { @@ -56006,7 +56187,7 @@ func _checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*TIntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*TIntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+72, __ccgo_ts+4270, int32(1)) + Xsqlite3_str_append(tls, pCheck+72, __ccgo_ts+4296, int32(1)) } if (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+72, (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp+8, (*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv0, (*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) @@ -56054,11 +56235,11 @@ func _checkRef(tls *libc.TLS, pCheck uintptr, iPage TPgno) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) if iPage > (*TIntegrityCk)(unsafe.Pointer(pCheck)).FnCkPage || iPage == uint32(0) { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4272, libc.VaList(bp+8, iPage)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4298, libc.VaList(bp+8, iPage)) return int32(1) } if _getPageReferenced(tls, pCheck, iPage) != 0 { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4295, libc.VaList(bp+8, iPage)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4321, libc.VaList(bp+8, iPage)) return int32(1) } _setPageReferenced(tls, pCheck, iPage) @@ -56084,11 +56265,11 @@ func _checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild TPgno, eType Tu8, iParen if rc == int32(SQLITE_NOMEM) || rc == libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(12)<<libc.Int32FromInt32(8) { _checkOom(tls, pCheck) } - _checkAppendMsg(tls, pCheck, __ccgo_ts+4320, libc.VaList(bp+16, iChild)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4346, libc.VaList(bp+16, iChild)) return } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))) != libc.Int32FromUint8(eType) || *(*TPgno)(unsafe.Pointer(bp + 4)) != iParent { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4349, libc.VaList(bp+16, iChild, libc.Int32FromUint8(eType), iParent, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))), *(*TPgno)(unsafe.Pointer(bp + 4)))) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4375, libc.VaList(bp+16, iChild, libc.Int32FromUint8(eType), iParent, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))), *(*TPgno)(unsafe.Pointer(bp + 4)))) } } @@ -56115,7 +56296,7 @@ func _checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage TPgno, N } N-- if _sqlite3PagerGet(tls, (*TIntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp, 0) != 0 { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4403, libc.VaList(bp+16, iPage)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4429, libc.VaList(bp+16, iPage)) break } pOvflData = _sqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -56125,7 +56306,7 @@ func _checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage TPgno, N _checkPtrmap(tls, pCheck, iPage, uint8(PTRMAP_FREEPAGE), uint32(0)) } if n > (*TBtShared)(unsafe.Pointer((*TIntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/uint32(4)-uint32(2) { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4425, libc.VaList(bp+16, iPage)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4451, libc.VaList(bp+16, iPage)) N-- } else { i = 0 @@ -56160,11 +56341,11 @@ func _checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage TPgno, N } if N != 0 && nErrAtStart == (*TIntegrityCk)(unsafe.Pointer(pCheck)).FnErr { if isFreeList != 0 { - v2 = __ccgo_ts + 4464 + v2 = __ccgo_ts + 4490 } else { - v2 = __ccgo_ts + 4469 + v2 = __ccgo_ts + 4495 } - _checkAppendMsg(tls, pCheck, __ccgo_ts+4490, libc.VaList(bp+16, v2, expected-N, expected)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4516, libc.VaList(bp+16, v2, expected-N, expected)) } } @@ -56300,12 +56481,12 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr if _checkRef(tls, pCheck, iPage) != 0 { return 0 } - (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4516 + (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4542 (*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage v1 = _btreeGetPage(tls, pBt, iPage, bp+8, 0) rc = v1 if v1 != 0 { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4534, libc.VaList(bp+56, rc)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4560, libc.VaList(bp+56, rc)) if rc == libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(12)<<libc.Int32FromInt32(8) { (*TIntegrityCk)(unsafe.Pointer(pCheck)).Frc = int32(SQLITE_NOMEM) } @@ -56319,19 +56500,19 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr rc = v2 if v2 != 0 { /* The only possible error from InitPage */ - _checkAppendMsg(tls, pCheck, __ccgo_ts+4572, libc.VaList(bp+56, rc)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4598, libc.VaList(bp+56, rc)) goto end_of_check } v3 = _btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) rc = v3 if v3 != 0 { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4610, libc.VaList(bp+56, rc)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4636, libc.VaList(bp+56, rc)) goto end_of_check } data = (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FhdrOffset) /* Set up for cell analysis */ - (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4632 + (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4658 contentOffset = libc.Uint32FromInt32((libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))))<<libc.Int32FromInt32(8)|libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1)))-libc.Int32FromInt32(1))&libc.Int32FromInt32(0xffff) + libc.Int32FromInt32(1)) /* Enforced by btreeInitPage() */ /* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the @@ -56348,7 +56529,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr /* Analyze the right-child page of internal pages */ pgno = libc.Int32FromUint32(_sqlite3Get4byte(tls, data+uintptr(hdr+int32(8)))) if (*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { - (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4658 + (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4684 _checkPtrmap(tls, pCheck, libc.Uint32FromInt32(pgno), uint8(PTRMAP_BTREE), iPage) } depth = _checkTreePage(tls, pCheck, libc.Uint32FromInt32(pgno), bp, *(*Ti64)(unsafe.Pointer(bp))) @@ -56371,14 +56552,14 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr pc = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pCellIdx)))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pCellIdx + 1)))) pCellIdx -= uintptr(2) if pc < contentOffset || pc > usableSize-uint32(4) { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4688, libc.VaList(bp+56, pc, contentOffset, usableSize-uint32(4))) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4714, libc.VaList(bp+56, pc, contentOffset, usableSize-uint32(4))) doCoverageCheck = 0 goto _4 } pCell = data + uintptr(pc) (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FxParseCell})))(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), pCell, bp+24) if pc+uint32((*(*TCellInfo)(unsafe.Pointer(bp + 24))).FnSize) > usableSize { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4718, 0) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4744, 0) doCoverageCheck = 0 goto _4 } @@ -56390,7 +56571,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr v5 = libc.BoolInt32((*(*TCellInfo)(unsafe.Pointer(bp + 24))).FnKey >= *(*Ti64)(unsafe.Pointer(bp))) } if v5 != 0 { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4742, libc.VaList(bp+56, (*(*TCellInfo)(unsafe.Pointer(bp + 24))).FnKey)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4768, libc.VaList(bp+56, (*(*TCellInfo)(unsafe.Pointer(bp + 24))).FnKey)) } *(*Ti64)(unsafe.Pointer(bp)) = (*(*TCellInfo)(unsafe.Pointer(bp + 24))).FnKey keyCanBeEqual = 0 /* Only the first key on the page may ==maxKey */ @@ -56413,7 +56594,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr d2 = _checkTreePage(tls, pCheck, libc.Uint32FromInt32(pgno), bp, *(*Ti64)(unsafe.Pointer(bp))) keyCanBeEqual = 0 if d2 != depth { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4766, 0) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4792, 0) depth = d2 } } else { @@ -56490,7 +56671,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr prev = contentOffset - uint32(1) /* Implied first min-heap entry */ for _btreeHeapPull(tls, heap, bp+16) != 0 { if prev&uint32(0xffff) >= *(*Tu32)(unsafe.Pointer(bp + 16))>>libc.Int32FromInt32(16) { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4791, libc.VaList(bp+56, *(*Tu32)(unsafe.Pointer(bp + 16))>>int32(16), iPage)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4817, libc.VaList(bp+56, *(*Tu32)(unsafe.Pointer(bp + 16))>>int32(16), iPage)) break } else { nFrag = int32(uint32(nFrag) + (*(*Tu32)(unsafe.Pointer(bp + 16))>>libc.Int32FromInt32(16) - prev&libc.Uint32FromInt32(0xffff) - libc.Uint32FromInt32(1))) @@ -56504,7 +56685,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr ** number of fragmented free bytes within the cell content area. */ if *(*Tu32)(unsafe.Pointer(heap)) == uint32(0) && nFrag != libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))) { - _checkAppendMsg(tls, pCheck, __ccgo_ts+4828, libc.VaList(bp+56, nFrag, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))), iPage)) + _checkAppendMsg(tls, pCheck, __ccgo_ts+4854, libc.VaList(bp+56, nFrag, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))), iPage)) } } goto end_of_check @@ -56595,7 +56776,7 @@ func _sqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uin /* Check the integrity of the freelist */ if bCkFreelist != 0 { - (*(*TIntegrityCk)(unsafe.Pointer(bp))).FzPfx = __ccgo_ts + 4880 + (*(*TIntegrityCk)(unsafe.Pointer(bp))).FzPfx = __ccgo_ts + 4906 _checkList(tls, bp, int32(1), _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32), _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)) (*(*TIntegrityCk)(unsafe.Pointer(bp))).FzPfx = uintptr(0) } @@ -56619,11 +56800,11 @@ func _sqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uin } mxInHdr = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+52) if mx != mxInHdr { - _checkAppendMsg(tls, bp, __ccgo_ts+4891, libc.VaList(bp+248, mx, mxInHdr)) + _checkAppendMsg(tls, bp, __ccgo_ts+4917, libc.VaList(bp+248, mx, mxInHdr)) } } else { if _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+64) != uint32(0) { - _checkAppendMsg(tls, bp, __ccgo_ts+4936, 0) + _checkAppendMsg(tls, bp, __ccgo_ts+4962, 0) } } } @@ -56660,10 +56841,10 @@ func _sqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uin ** references to pointer-map pages. */ if _getPageReferenced(tls, bp, i) == 0 && (_ptrmapPageno(tls, pBt, i) != i || !((*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0)) { - _checkAppendMsg(tls, bp, __ccgo_ts+4991, libc.VaList(bp+248, i)) + _checkAppendMsg(tls, bp, __ccgo_ts+5017, libc.VaList(bp+248, i)) } if _getPageReferenced(tls, bp, i) != 0 && (_ptrmapPageno(tls, pBt, i) == i && (*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { - _checkAppendMsg(tls, bp, __ccgo_ts+5011, libc.VaList(bp+248, i)) + _checkAppendMsg(tls, bp, __ccgo_ts+5037, libc.VaList(bp+248, i)) } goto _3 _3: @@ -57102,7 +57283,7 @@ func _findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) (r ui rc = 0 _sqlite3ParseObjectInit(tls, bp, pDb) if _sqlite3OpenTempDatabase(tls, bp) != 0 { - _sqlite3ErrorWithMsg(tls, pErrorDb, (*(*TParse)(unsafe.Pointer(bp))).Frc, __ccgo_ts+3862, libc.VaList(bp+432, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg)) + _sqlite3ErrorWithMsg(tls, pErrorDb, (*(*TParse)(unsafe.Pointer(bp))).Frc, __ccgo_ts+3888, libc.VaList(bp+432, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg)) rc = int32(SQLITE_ERROR) } _sqlite3DbFree(tls, pErrorDb, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg) @@ -57112,7 +57293,7 @@ func _findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) (r ui } } if i < 0 { - _sqlite3ErrorWithMsg(tls, pErrorDb, int32(SQLITE_ERROR), __ccgo_ts+5043, libc.VaList(bp+432, zDb)) + _sqlite3ErrorWithMsg(tls, pErrorDb, int32(SQLITE_ERROR), __ccgo_ts+5069, libc.VaList(bp+432, zDb)) return uintptr(0) } return (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(pDb)).FaDb + uintptr(i)*32))).FpBt @@ -57141,7 +57322,7 @@ func _setDestPgsz(tls *libc.TLS, p uintptr) (r int32) { // */ func _checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) (r int32) { if _sqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+5063, 0) + _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+5089, 0) return int32(SQLITE_ERROR) } return SQLITE_OK @@ -57171,7 +57352,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(pSrcDb)).Fmutex) Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(pDestDb)).Fmutex) if pSrcDb == pDestDb { - _sqlite3ErrorWithMsg(tls, pDestDb, int32(SQLITE_ERROR), __ccgo_ts+5094, 0) + _sqlite3ErrorWithMsg(tls, pDestDb, int32(SQLITE_ERROR), __ccgo_ts+5120, 0) p = uintptr(0) } else { /* Allocate space for a new sqlite3_backup object... @@ -57847,7 +58028,7 @@ func _vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { } else { v1 = *(*float64)(unsafe.Pointer(p)) } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5134, libc.VaList(bp+40, v1)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5160, libc.VaList(bp+40, v1)) *(*int8)(unsafe.Pointer(zBuf + uintptr((*(*TStrAccum)(unsafe.Pointer(bp))).FnChar))) = 0 /* Fast version of sqlite3StrAccumFinish(&acc) */ (*TMem)(unsafe.Pointer(p)).Fn = libc.Int32FromUint32((*(*TStrAccum)(unsafe.Pointer(bp))).FnChar) } @@ -57985,9 +58166,6 @@ func _sqlite3VdbeMemZeroTerminateIfAble(tls *libc.TLS, pMem uintptr) { if libc.Int32FromUint8((*TMem)(unsafe.Pointer(pMem)).Fenc) != int32(SQLITE_UTF8) { return } - if (*TMem)(unsafe.Pointer(pMem)).Fz == uintptr(0) { - return - } if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pMem)).Fflags)&int32(MEM_Dyn) != 0 { if (*TMem)(unsafe.Pointer(pMem)).FxDel == __ccgo_fp(Xsqlite3_free) && Xsqlite3_msize(tls, (*TMem)(unsafe.Pointer(pMem)).Fz) >= libc.Uint64FromInt32((*TMem)(unsafe.Pointer(pMem)).Fn+libc.Int32FromInt32(1)) { *(*int8)(unsafe.Pointer((*TMem)(unsafe.Pointer(pMem)).Fz + uintptr((*TMem)(unsafe.Pointer(pMem)).Fn))) = 0 @@ -58162,20 +58340,20 @@ func _sqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) (r int3 bp := tls.Alloc(112) defer tls.Free(112) var _ /* ctx at bp+0 */ Tsqlite3_context - var _ /* t at bp+56 */ TMem - libc.Xmemset(tls, bp, 0, uint64(56)) - libc.Xmemset(tls, bp+56, 0, uint64(56)) - (*(*TMem)(unsafe.Pointer(bp + 56))).Fflags = uint16(MEM_Null) - (*(*TMem)(unsafe.Pointer(bp + 56))).Fdb = (*TMem)(unsafe.Pointer(pMem)).Fdb - (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = bp + 56 + var _ /* t at bp+48 */ TMem + libc.Xmemset(tls, bp, 0, uint64(48)) + libc.Xmemset(tls, bp+48, 0, uint64(56)) + (*(*TMem)(unsafe.Pointer(bp + 48))).Fflags = uint16(MEM_Null) + (*(*TMem)(unsafe.Pointer(bp + 48))).Fdb = (*TMem)(unsafe.Pointer(pMem)).Fdb + (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = bp + 48 (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpMem = pMem (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpFunc = pFunc - (*(*Tsqlite3_context)(unsafe.Pointer(bp))).Fenc = (*Tsqlite3)(unsafe.Pointer((*(*TMem)(unsafe.Pointer(bp + 56))).Fdb)).Fenc + (*(*Tsqlite3_context)(unsafe.Pointer(bp))).Fenc = (*Tsqlite3)(unsafe.Pointer((*(*TMem)(unsafe.Pointer(bp + 48))).Fdb)).Fenc (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TFuncDef)(unsafe.Pointer(pFunc)).FxFinalize})))(tls, bp) /* IMP: R-24505-23230 */ if (*TMem)(unsafe.Pointer(pMem)).FszMalloc > 0 { _sqlite3DbFreeNN(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, (*TMem)(unsafe.Pointer(pMem)).FzMalloc) } - libc.Xmemcpy(tls, pMem, bp+56, uint64(56)) + libc.Xmemcpy(tls, pMem, bp+48, uint64(56)) return (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FisError } @@ -58190,10 +58368,10 @@ func _sqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) (r int3 // ** otherwise. // */ func _sqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) (r int32) { - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(48) + defer tls.Free(48) var _ /* ctx at bp+0 */ Tsqlite3_context - libc.Xmemset(tls, bp, 0, uint64(56)) + libc.Xmemset(tls, bp, 0, uint64(48)) _sqlite3VdbeMemSetNull(tls, pOut) (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = pOut (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpMem = pAccum @@ -58947,7 +59125,7 @@ func _sqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32 _, _ = rc, v1 (*TMem)(unsafe.Pointer(pMem)).Fflags = uint16(MEM_Null) if _sqlite3BtreeMaxRecordSize(tls, pCur) < libc.Int64FromUint32(offset+amt) { - return _sqlite3CorruptError(tls, int32(84327)) + return _sqlite3CorruptError(tls, int32(85108)) } v1 = _sqlite3VdbeMemClearAndResize(tls, pMem, libc.Int32FromUint32(amt+uint32(1))) rc = v1 @@ -59111,7 +59289,8 @@ type ValueNewStat4Ctx = TValueNewStat4Ctx // ** an sqlite3_value within the UnpackedRecord.a[] array. // */ func _valueNew(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { - var i, nByte, nCol int32 + var i, nCol int32 + var nByte Ti64 var pIdx, pRec uintptr _, _, _, _, _ = i, nByte, nCol, pIdx, pRec if p != 0 { @@ -59119,8 +59298,8 @@ func _valueNew(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { if pRec == uintptr(0) { pIdx = (*TValueNewStat4Ctx)(unsafe.Pointer(p)).FpIdx /* Counter variable */ nCol = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) /* Number of index columns including rowid */ - nByte = libc.Int32FromUint64(uint64(56)*libc.Uint64FromInt32(nCol) + (libc.Uint64FromInt64(40)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))) - pRec = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte)) + nByte = libc.Int64FromUint64(uint64(56)*libc.Uint64FromInt32(nCol) + (libc.Uint64FromInt64(40)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))) + pRec = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte)) if pRec != 0 { (*TUnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo = _sqlite3KeyInfoOfIndex(tls, (*TValueNewStat4Ctx)(unsafe.Pointer(p)).FpParse, pIdx) if (*TUnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo != 0 { @@ -59177,14 +59356,14 @@ func _valueNew(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { // ** NULL and an SQLite error code returned. // */ func _valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc Tu8, aff Tu8, ppVal uintptr, pCtx uintptr) (r int32) { - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(64) + defer tls.Free(64) var apVal, pFunc, pList, pVal uintptr var i, nVal, rc int32 var _ /* ctx at bp+0 */ Tsqlite3_context _, _, _, _, _, _, _ = apVal, i, nVal, pFunc, pList, pVal, rc /* Context object for function invocation */ apVal = uintptr(0) /* Function arguments */ - nVal = 0 /* Size of apVal[] array */ + nVal = 0 /* Number of function arguments */ pFunc = uintptr(0) /* Function definition */ pVal = uintptr(0) /* New value */ rc = SQLITE_OK /* Return code */ @@ -59223,14 +59402,14 @@ func _valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc Tu8, aff Tu8, rc = int32(SQLITE_NOMEM) goto value_from_function_out } - libc.Xmemset(tls, bp, 0, uint64(56)) + libc.Xmemset(tls, bp, 0, uint64(48)) (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = pVal (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpFunc = pFunc (*(*Tsqlite3_context)(unsafe.Pointer(bp))).Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TFuncDef)(unsafe.Pointer(pFunc)).FxSFunc})))(tls, bp, nVal, apVal) if (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FisError != 0 { rc = (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FisError - _sqlite3ErrorMsg(tls, (*TValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, __ccgo_ts+3862, libc.VaList(bp+64, Xsqlite3_value_text(tls, pVal))) + _sqlite3ErrorMsg(tls, (*TValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, __ccgo_ts+3888, libc.VaList(bp+56, Xsqlite3_value_text(tls, pVal))) } else { _sqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) rc = _sqlite3VdbeChangeEncoding(tls, pVal, libc.Int32FromUint8(enc)) @@ -59330,7 +59509,7 @@ func _valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc Tu8, affinity pExpr = pLeft op = libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) negInt = -int32(1) - zNeg = __ccgo_ts + 5141 + zNeg = __ccgo_ts + 5167 } } } @@ -59345,7 +59524,7 @@ func _valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc Tu8, affinity if op == int32(TK_INTEGER) && 0 == _sqlite3DecOrHexToI64(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), bp+8) { _sqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*Ti64)(unsafe.Pointer(bp + 8))*int64(negInt)) } else { - zVal = _sqlite3MPrintf(tls, db, __ccgo_ts+5143, libc.VaList(bp+24, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = _sqlite3MPrintf(tls, db, __ccgo_ts+5169, libc.VaList(bp+24, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if zVal == uintptr(0) { goto no_mem } @@ -59649,7 +59828,7 @@ func _sqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC } iHdr = uint32(libc.Uint8FromInt32(v1)) if *(*Tu32)(unsafe.Pointer(bp + 4)) > libc.Uint32FromInt32(nRec) || iHdr >= *(*Tu32)(unsafe.Pointer(bp + 4)) { - return _sqlite3CorruptError(tls, int32(85013)) + return _sqlite3CorruptError(tls, int32(85794)) } iField = libc.Int64FromUint32(*(*Tu32)(unsafe.Pointer(bp + 4))) i = 0 @@ -59665,7 +59844,7 @@ func _sqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC } iHdr += uint32(libc.Uint8FromInt32(v3)) if iHdr > *(*Tu32)(unsafe.Pointer(bp + 4)) { - return _sqlite3CorruptError(tls, int32(85019)) + return _sqlite3CorruptError(tls, int32(85800)) } szField = _sqlite3VdbeSerialTypeLen(tls, *(*Tu32)(unsafe.Pointer(bp))) iField += libc.Int64FromUint32(szField) @@ -59675,7 +59854,7 @@ func _sqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC i++ } if iField > int64(nRec) { - return _sqlite3CorruptError(tls, int32(85025)) + return _sqlite3CorruptError(tls, int32(85806)) } if pMem == uintptr(0) { v4 = _sqlite3ValueNew(tls, db) @@ -60136,12 +60315,11 @@ func _sqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // ** while computing a generated column value. 0 is the usual case. // */ func _sqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) (r int32) { - var addr, nByte, v1 int32 + var addr, v1 int32 var pCtx, v uintptr - _, _, _, _, _ = addr, nByte, pCtx, v, v1 + _, _, _, _ = addr, pCtx, v, v1 v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe - nByte = libc.Int32FromUint64(uint64(56) + libc.Uint64FromInt32(nArg-libc.Int32FromInt32(1))*uint64(8)) - pCtx = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt32(nByte)) + pCtx = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(libc.UintptrFromInt32(0)+48)+libc.Uint64FromInt32(nArg)*libc.Uint64FromInt64(8))) if pCtx == uintptr(0) { _freeEphemeralFunction(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pFunc) return 0 @@ -60315,7 +60493,7 @@ func _sqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) (r int32) { var v1 int32 var v2 uintptr _, _ = v1, v2 - v2 = pParse + 72 + v2 = pParse + 76 *(*int32)(unsafe.Pointer(v2))-- v1 = *(*int32)(unsafe.Pointer(v2)) return v1 @@ -60400,8 +60578,8 @@ func _sqlite3VdbeReusable(tls *libc.TLS, p uintptr) { // ** (1) For each jump instruction with a negative P2 value (a label) // ** resolve the P2 value to an actual address. // ** -// ** (2) Compute the maximum number of arguments used by any SQL function -// ** and store that value in *pMaxFuncArgs. +// ** (2) Compute the maximum number of arguments used by the xUpdate/xFilter +// ** methods of any virtual table and store that value in *pMaxVtabArgs. // ** // ** (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately // ** indicate what the prepared statement actually does. @@ -60414,11 +60592,11 @@ func _sqlite3VdbeReusable(tls *libc.TLS, p uintptr) { // ** script numbers the opcodes correctly. Changes to this routine must be // ** coordinated with changes to mkopcodeh.tcl. // */ -func _resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { +func _resolveP2Values(tls *libc.TLS, p uintptr, pMaxVtabArgs uintptr) { var aLabel, pOp, pParse uintptr - var n, nMaxArgs int32 - _, _, _, _, _ = aLabel, n, nMaxArgs, pOp, pParse - nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) + var n, nMaxVtabArgs int32 + _, _, _, _, _ = aLabel, n, nMaxVtabArgs, pOp, pParse + nMaxVtabArgs = *(*int32)(unsafe.Pointer(pMaxVtabArgs)) pParse = (*TVdbe)(unsafe.Pointer(p)).FpParse aLabel = (*TParse)(unsafe.Pointer(pParse)).FaLabel /* tag-20230419-1 */ @@ -60455,13 +60633,16 @@ func _resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { case int32(OP_Init): goto resolve_p2_values_loop_exit case int32(OP_VUpdate): - if (*TOp)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { - nMaxArgs = (*TOp)(unsafe.Pointer(pOp)).Fp2 + if (*TOp)(unsafe.Pointer(pOp)).Fp2 > nMaxVtabArgs { + nMaxVtabArgs = (*TOp)(unsafe.Pointer(pOp)).Fp2 } case int32(OP_VFilter): + /* The instruction immediately prior to VFilter will be an + ** OP_Integer that sets the "argc" value for the VFilter. See + ** the code where OP_VFilter is generated at tag-20250207a. */ n = (*(*TOp)(unsafe.Pointer(pOp + uintptr(-libc.Int32FromInt32(1))*24))).Fp1 - if n > nMaxArgs { - nMaxArgs = n + if n > nMaxVtabArgs { + nMaxVtabArgs = n } /* Fall through into the default case */ fallthrough @@ -60492,7 +60673,7 @@ resolve_p2_values_loop_exit: (*TParse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) } (*TParse)(unsafe.Pointer(pParse)).FnLabel = 0 - *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs + *(*int32)(unsafe.Pointer(pMaxVtabArgs)) = nMaxVtabArgs } // C documentation @@ -60994,7 +61175,7 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) { switch int32((*TOp)(unsafe.Pointer(pOp)).Fp4type) { case -int32(8): pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5148, libc.VaList(bp+40, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5174, libc.VaList(bp+40, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) j = 0 for { if !(j < libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)) { @@ -61007,39 +61188,39 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) { v2 = __ccgo_ts + 1665 } zColl = v2 - if libc.Xstrcmp(tls, zColl, __ccgo_ts+5153) == 0 { - zColl = __ccgo_ts + 5160 + if libc.Xstrcmp(tls, zColl, __ccgo_ts+5179) == 0 { + zColl = __ccgo_ts + 5186 } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&int32(KEYINFO_ORDER_DESC) != 0 { - v3 = __ccgo_ts + 5141 + v3 = __ccgo_ts + 5167 } else { v3 = __ccgo_ts + 1665 } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&int32(KEYINFO_ORDER_BIGNULL) != 0 { - v4 = __ccgo_ts + 5162 + v4 = __ccgo_ts + 5188 } else { v4 = __ccgo_ts + 1665 } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5165, libc.VaList(bp+40, v3, v4, zColl)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5191, libc.VaList(bp+40, v3, v4, zColl)) goto _1 _1: ; j++ } - Xsqlite3_str_append(tls, bp, __ccgo_ts+5173, int32(1)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+5199, int32(1)) case -int32(2): pColl1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5189, libc.VaList(bp+40, (*TCollSeq)(unsafe.Pointer(pColl1)).FzName, _encnames[(*TCollSeq)(unsafe.Pointer(pColl1)).Fenc])) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5215, libc.VaList(bp+40, (*TCollSeq)(unsafe.Pointer(pColl1)).FzName, _encnames[(*TCollSeq)(unsafe.Pointer(pColl1)).Fenc])) case -int32(7): pDef = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5198, libc.VaList(bp+40, (*TFuncDef)(unsafe.Pointer(pDef)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5224, libc.VaList(bp+40, (*TFuncDef)(unsafe.Pointer(pDef)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef)).FnArg))) case -int32(15): pDef1 = (*Tsqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5198, libc.VaList(bp+40, (*TFuncDef)(unsafe.Pointer(pDef1)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef1)).FnArg))) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5224, libc.VaList(bp+40, (*TFuncDef)(unsafe.Pointer(pDef1)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef1)).FnArg))) case -int32(13): Xsqlite3_str_appendf(tls, bp, __ccgo_ts+1426, libc.VaList(bp+40, *(*Ti64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) case -int32(3): - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5205, libc.VaList(bp+40, (*TOp)(unsafe.Pointer(pOp)).Fp4.Fi)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5231, libc.VaList(bp+40, (*TOp)(unsafe.Pointer(pOp)).Fp4.Fi)) case -int32(12): Xsqlite3_str_appendf(tls, bp, __ccgo_ts+1393, libc.VaList(bp+40, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) case -int32(10): @@ -61056,14 +61237,14 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) { if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pMem)).Fflags)&int32(MEM_Null) != 0 { zP4 = __ccgo_ts + 1666 } else { - zP4 = __ccgo_ts + 5208 + zP4 = __ccgo_ts + 5234 } } } } case -int32(11): pVtab = (*TVTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5215, libc.VaList(bp+40, pVtab)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5241, libc.VaList(bp+40, pVtab)) case -int32(14): ai = *(*uintptr)(unsafe.Pointer(pOp + 16)) n = *(*Tu32)(unsafe.Pointer(ai)) /* The first element of an INTARRAY is always the @@ -61078,20 +61259,20 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) { } else { v6 = int32(',') } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5223, libc.VaList(bp+40, v6, *(*Tu32)(unsafe.Pointer(ai + uintptr(i)*4)))) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5249, libc.VaList(bp+40, v6, *(*Tu32)(unsafe.Pointer(ai + uintptr(i)*4)))) goto _5 _5: ; i++ } - Xsqlite3_str_append(tls, bp, __ccgo_ts+5228, int32(1)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+5254, int32(1)) case -int32(4): - zP4 = __ccgo_ts + 5230 + zP4 = __ccgo_ts + 5256 case -int32(5): zP4 = (*TTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FzName case -int32(17): pSig = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5238, libc.VaList(bp+40, (*TSubrtnSig)(unsafe.Pointer(pSig)).FselId, (*TSubrtnSig)(unsafe.Pointer(pSig)).FzAff)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5264, libc.VaList(bp+40, (*TSubrtnSig)(unsafe.Pointer(pSig)).FselId, (*TSubrtnSig)(unsafe.Pointer(pSig)).FzAff)) default: zP4 = *(*uintptr)(unsafe.Pointer(pOp + 16)) } @@ -61105,10 +61286,10 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) { } var _encnames = [4]uintptr{ - 0: __ccgo_ts + 5175, - 1: __ccgo_ts + 5177, - 2: __ccgo_ts + 5179, - 3: __ccgo_ts + 5184, + 0: __ccgo_ts + 5201, + 1: __ccgo_ts + 5203, + 2: __ccgo_ts + 5205, + 3: __ccgo_ts + 5210, } // C documentation @@ -62059,7 +62240,7 @@ func _vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) (r int32) { retryCount = 0 /* Select a super-journal file name */ nMainFile = _sqlite3Strlen30(tls, zMainFile) - zSuper = _sqlite3MPrintf(tls, db, __ccgo_ts+5254, libc.VaList(bp+24, 0, zMainFile, 0)) + zSuper = _sqlite3MPrintf(tls, db, __ccgo_ts+5280, libc.VaList(bp+24, 0, zMainFile, 0)) if zSuper == uintptr(0) { return int32(SQLITE_NOMEM) } @@ -62067,18 +62248,18 @@ func _vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) (r int32) { for cond := true; cond; cond = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8)) != 0 { if retryCount != 0 { if retryCount > int32(100) { - Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5266, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5292, libc.VaList(bp+24, zSuper)) _sqlite3OsDelete(tls, pVfs, zSuper, 0) break } else { if retryCount == int32(1) { - Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5280, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5306, libc.VaList(bp+24, zSuper)) } } } retryCount++ Xsqlite3_randomness(tls, int32(4), bp+12) - Xsqlite3_snprintf(tls, int32(13), zSuper+uintptr(nMainFile), __ccgo_ts+5295, libc.VaList(bp+24, *(*Tu32)(unsafe.Pointer(bp + 12))>>libc.Int32FromInt32(8)&uint32(0xffffff), *(*Tu32)(unsafe.Pointer(bp + 12))&uint32(0xff))) + Xsqlite3_snprintf(tls, int32(13), zSuper+uintptr(nMainFile), __ccgo_ts+5321, libc.VaList(bp+24, *(*Tu32)(unsafe.Pointer(bp + 12))>>libc.Int32FromInt32(8)&uint32(0xffffff), *(*Tu32)(unsafe.Pointer(bp + 12))&uint32(0xff))) /* The antipenultimate character of the super-journal name must ** be "9" to avoid name collisions when using 8+3 filenames. */ rc = _sqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+8) @@ -62309,7 +62490,7 @@ func _sqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) (r int32) { if deferred != 0 && (*Tsqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Tsqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > 0 || !(deferred != 0) && (*TVdbe)(unsafe.Pointer(p)).FnFkConstraint > 0 { (*TVdbe)(unsafe.Pointer(p)).Frc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(3)<<libc.Int32FromInt32(8) (*TVdbe)(unsafe.Pointer(p)).FerrorAction = uint8(OE_Abort) - _sqlite3VdbeError(tls, p, __ccgo_ts+5308, 0) + _sqlite3VdbeError(tls, p, __ccgo_ts+5334, 0) if libc.Int32FromUint8((*TVdbe)(unsafe.Pointer(p)).FprepFlags)&int32(SQLITE_PREPARE_SAVESQL) == 0 { return int32(SQLITE_ERROR) } @@ -62759,7 +62940,7 @@ func _sqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) (r int32) { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return _sqlite3CorruptError(tls, int32(88898)) + return _sqlite3CorruptError(tls, int32(89687)) } (*TVdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = uint8(0) (*TVdbeCursor)(unsafe.Pointer(p)).FcacheStatus = uint32(CACHE_STALE) @@ -63607,7 +63788,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > libc.Uint32FromInt32(nKey1) { - (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(89856))) + (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90646))) return 0 /* Corruption */ } /* Only needed by assert() statements */ @@ -63697,7 +63878,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr pKeyInfo = v4 } if v5 || libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(v4)).FnAllField) <= i { - (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(89937))) + (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90727))) return 0 /* Corruption */ } else { if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { @@ -63732,7 +63913,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else { nStr = libc.Int32FromUint32((*(*Tu32)(unsafe.Pointer(bp + 68)) - uint32(12)) / uint32(2)) if d1+libc.Uint32FromInt32(nStr) > libc.Uint32FromInt32(nKey1) { - (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(89967))) + (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90757))) return 0 /* Corruption */ } else { if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pRhs)).Fflags)&int32(MEM_Zero) != 0 { @@ -63786,7 +63967,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } idx1 += libc.Uint32FromInt32(_sqlite3VarintLen(tls, uint64(*(*Tu32)(unsafe.Pointer(bp + 68))))) if idx1 >= *(*Tu32)(unsafe.Pointer(bp)) { - (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90018))) + (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90808))) return 0 /* Corrupt index */ } } @@ -63918,7 +64099,7 @@ vrcs_restart: szHdr = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aKey1))) nStr = (*(*int32)(unsafe.Pointer(bp)) - int32(12)) / int32(2) if szHdr+nStr > nKey1 { - (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90181))) + (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90971))) return 0 /* Corruption */ } if (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).Fn < nStr { @@ -64070,7 +64251,7 @@ func _sqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr idx_rowid_corruption: ; _sqlite3VdbeMemReleaseMalloc(tls, bp+8) - return _sqlite3CorruptError(tls, int32(90339)) + return _sqlite3CorruptError(tls, int32(91129)) } // C documentation @@ -64101,7 +64282,7 @@ func _sqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */ if nCellKey <= 0 || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return _sqlite3CorruptError(tls, int32(90372)) + return _sqlite3CorruptError(tls, int32(91162)) } _sqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = _sqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, libc.Uint32FromInt64(nCellKey), bp) @@ -64252,15 +64433,15 @@ func _sqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) (r int32) { pOp = (*TVdbe)(unsafe.Pointer((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe)).FaOp + uintptr((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FiOp)*24 if libc.Int32FromUint8((*TVdbeOp)(unsafe.Pointer(pOp)).Fopcode) == int32(OP_PureFunc) { if libc.Int32FromUint16((*TVdbeOp)(unsafe.Pointer(pOp)).Fp5)&int32(NC_IsCheck) != 0 { - zContext = __ccgo_ts + 5338 + zContext = __ccgo_ts + 5364 } else { if libc.Int32FromUint16((*TVdbeOp)(unsafe.Pointer(pOp)).Fp5)&int32(NC_GenCol) != 0 { - zContext = __ccgo_ts + 5357 + zContext = __ccgo_ts + 5383 } else { - zContext = __ccgo_ts + 5376 + zContext = __ccgo_ts + 5402 } } - zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+5385, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext)) + zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+5411, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext)) Xsqlite3_result_error(tls, pCtx, zMsg, -int32(1)) Xsqlite3_free(tls, zMsg) return 0 @@ -64355,10 +64536,11 @@ func _sqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, (*(*TPreUpdate)(unsafe.Pointer(bp))).FpCsr = pCsr (*(*TPreUpdate)(unsafe.Pointer(bp))).Fop = op (*(*TPreUpdate)(unsafe.Pointer(bp))).FiNewReg = iReg - (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.Fdb = db - (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc - (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FnKeyField = libc.Uint16FromInt16((*TTable)(unsafe.Pointer(pTab)).FnCol) - (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FaSortFlags = uintptr(unsafe.Pointer(&_fakeSortOrder)) + (*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo = bp + 168 + (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).Fdb = db + (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc + (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FnKeyField = libc.Uint16FromInt16((*TTable)(unsafe.Pointer(pTab)).FnCol) + (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FaSortFlags = uintptr(unsafe.Pointer(&_fakeSortOrder)) (*(*TPreUpdate)(unsafe.Pointer(bp))).FiKey1 = iKey1 (*(*TPreUpdate)(unsafe.Pointer(bp))).FiKey2 = iKey2 (*(*TPreUpdate)(unsafe.Pointer(bp))).FpTab = pTab @@ -64367,9 +64549,9 @@ func _sqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Tsqlite3_int64, Tsqlite3_int64))(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback})))(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2) (*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdate = uintptr(0) _sqlite3DbFree(tls, db, (*(*TPreUpdate)(unsafe.Pointer(bp))).FaRecord) - _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpUnpacked) - _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpNewUnpacked) - _sqlite3VdbeMemRelease(tls, bp+112) + _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpUnpacked) + _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpNewUnpacked) + _sqlite3VdbeMemRelease(tls, bp+80) if (*(*TPreUpdate)(unsafe.Pointer(bp))).FaNew != 0 { i = 0 for { @@ -64449,7 +64631,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) (r int32) { // */ func _vdbeSafety(tls *libc.TLS, p uintptr) (r int32) { if (*TVdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5421, 0) + Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5447, 0) return int32(1) } else { return 0 @@ -64459,7 +64641,7 @@ func _vdbeSafety(tls *libc.TLS, p uintptr) (r int32) { func _vdbeSafetyNotNull(tls *libc.TLS, p uintptr) (r int32) { if p == uintptr(0) { - Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5466, 0) + Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5492, 0) return int32(1) } else { return _vdbeSafety(tls, p) @@ -64517,7 +64699,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) (r int32) { v = pStmt db = (*TVdbe)(unsafe.Pointer(v)).Fdb if _vdbeSafety(tls, v) != 0 { - return _sqlite3MisuseError(tls, int32(90769)) + return _sqlite3MisuseError(tls, int32(91560)) } Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) if (*TVdbe)(unsafe.Pointer(v)).FstartTime > 0 { @@ -65020,7 +65202,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { // /* Force an SQLITE_TOOBIG error. */ func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { (*Tsqlite3_context)(unsafe.Pointer(pCtx)).FisError = int32(SQLITE_TOOBIG) - _sqlite3VdbeMemSetStr(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpOut, __ccgo_ts+5506, int64(-int32(1)), uint8(SQLITE_UTF8), libc.UintptrFromInt32(0)) + _sqlite3VdbeMemSetStr(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpOut, __ccgo_ts+5532, int64(-int32(1)), uint8(SQLITE_UTF8), libc.UintptrFromInt32(0)) } // C documentation @@ -65221,7 +65403,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) (r int32) { v = pStmt /* the prepared statement */ cnt = 0 /* The database connection */ if _vdbeSafetyNotNull(tls, v) != 0 { - return _sqlite3MisuseError(tls, int32(91563)) + return _sqlite3MisuseError(tls, int32(92354)) } db = (*TVdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) @@ -65351,7 +65533,7 @@ func _valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32 _, _, _, _, _, _, _ = iOff, pOut, pRhs, rc, sz, zBuf, v1 *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) if pVal == uintptr(0) { - return _sqlite3MisuseError(tls, int32(91684)) + return _sqlite3MisuseError(tls, int32(92475)) } if libc.Int32FromUint16((*Tsqlite3_value)(unsafe.Pointer(pVal)).Fflags)&int32(MEM_Dyn) == 0 || (*Tsqlite3_value)(unsafe.Pointer(pVal)).FxDel != __ccgo_fp(_sqlite3VdbeValueListFree) { return int32(SQLITE_ERROR) @@ -65811,18 +65993,18 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) (r int32) { // ** Column names appropriate for EXPLAIN or EXPLAIN QUERY PLAN. // */ var _azExplainColNames8 = [12]uintptr{ - 0: __ccgo_ts + 5529, - 1: __ccgo_ts + 5534, - 2: __ccgo_ts + 5541, - 3: __ccgo_ts + 5544, - 4: __ccgo_ts + 5547, - 5: __ccgo_ts + 5550, - 6: __ccgo_ts + 5553, - 7: __ccgo_ts + 5556, - 8: __ccgo_ts + 5564, - 9: __ccgo_ts + 5567, - 10: __ccgo_ts + 5574, - 11: __ccgo_ts + 5582, + 0: __ccgo_ts + 5555, + 1: __ccgo_ts + 5560, + 2: __ccgo_ts + 5567, + 3: __ccgo_ts + 5570, + 4: __ccgo_ts + 5573, + 5: __ccgo_ts + 5576, + 6: __ccgo_ts + 5579, + 7: __ccgo_ts + 5582, + 8: __ccgo_ts + 5590, + 9: __ccgo_ts + 5593, + 10: __ccgo_ts + 5600, + 11: __ccgo_ts + 5608, } var _azExplainColNames16data = [60]Tu16{ 0: uint16('a'), @@ -66077,14 +66259,14 @@ func _vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) (r int32) { var v2 bool _, _, _ = pVar, v1, v2 if _vdbeSafetyNotNull(tls, p) != 0 { - return _sqlite3MisuseError(tls, int32(92300)) + return _sqlite3MisuseError(tls, int32(93091)) } Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if libc.Int32FromUint8((*TVdbe)(unsafe.Pointer(p)).FeVdbeState) != int32(VDBE_READY_STATE) { - _sqlite3Error(tls, (*TVdbe)(unsafe.Pointer(p)).Fdb, _sqlite3MisuseError(tls, int32(92304))) + _sqlite3Error(tls, (*TVdbe)(unsafe.Pointer(p)).Fdb, _sqlite3MisuseError(tls, int32(93095))) Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) - Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5589, libc.VaList(bp+8, (*TVdbe)(unsafe.Pointer(p)).FzSql)) - return _sqlite3MisuseError(tls, int32(92308)) + Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5615, libc.VaList(bp+8, (*TVdbe)(unsafe.Pointer(p)).FzSql)) + return _sqlite3MisuseError(tls, int32(93099)) } if i >= libc.Uint32FromInt16((*TVdbe)(unsafe.Pointer(p)).FnVar) { _sqlite3Error(tls, (*TVdbe)(unsafe.Pointer(p)).Fdb, int32(SQLITE_RANGE)) @@ -66235,7 +66417,7 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, if libc.Int32FromUint8(enc) == int32(SQLITE_UTF16) { enc = uint8(SQLITE_UTF16LE) } - nData &= libc.Uint64FromInt32(^libc.Int32FromUint16(libc.Uint16FromInt32(1))) + nData &= ^libc.Uint64FromInt32(1) } return _bindText(tls, pStmt, i, zData, libc.Int64FromUint64(nData), xDel, enc) } @@ -66658,11 +66840,11 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp /* Test that this call is being made from within an SQLITE_DELETE or ** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */ if !(p != 0) || (*TPreUpdate)(unsafe.Pointer(p)).Fop == int32(SQLITE_INSERT) { - rc = _sqlite3MisuseError(tls, int32(92851)) + rc = _sqlite3MisuseError(tls, int32(93642)) goto preupdate_old_out } if (*TPreUpdate)(unsafe.Pointer(p)).FpPk != 0 { - iStore = int32(_sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx))) + iStore = _sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, iIdx) } else { iStore = int32(_sqlite3TableColumnToStorage(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpTab, int16(iIdx))) } @@ -66671,7 +66853,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp goto preupdate_old_out } if iIdx == int32((*TTable)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey) { - v1 = p + 112 + v1 = p + 80 pMem = v1 *(*uintptr)(unsafe.Pointer(ppValue)) = v1 _sqlite3VdbeMemSetInt64(tls, pMem, (*TPreUpdate)(unsafe.Pointer(p)).FiKey1) @@ -66685,7 +66867,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp } rc = _sqlite3BtreePayload(tls, *(*uintptr)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpCsr + 48)), uint32(0), nRec, aRec) if rc == SQLITE_OK { - (*TPreUpdate)(unsafe.Pointer(p)).FpUnpacked = _vdbeUnpackRecord(tls, p+32, libc.Int32FromUint32(nRec), aRec) + (*TPreUpdate)(unsafe.Pointer(p)).FpUnpacked = _vdbeUnpackRecord(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpKeyinfo, libc.Int32FromUint32(nRec), aRec) if !((*TPreUpdate)(unsafe.Pointer(p)).FpUnpacked != 0) { rc = int32(SQLITE_NOMEM) } @@ -66720,7 +66902,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp })(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpTab + 64))).FpDfltList + 8 + uintptr(libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FiDflt)-int32(1))*32))).FpExpr rc = _sqlite3ValueFromExpr(tls, db, pDflt, (*Tsqlite3)(unsafe.Pointer(db)).Fenc, libc.Uint8FromInt8((*TColumn)(unsafe.Pointer(pCol)).Faffinity), bp) if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - rc = _sqlite3CorruptError(tls, int32(92908)) + rc = _sqlite3CorruptError(tls, int32(93701)) } *(*uintptr)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FapDflt + uintptr(iIdx)*8)) = *(*uintptr)(unsafe.Pointer(bp)) } @@ -66755,7 +66937,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) (r int32) { _, _ = p, v1 p = (*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdate if p != 0 { - v1 = libc.Int32FromUint16((*TPreUpdate)(unsafe.Pointer(p)).Fkeyinfo.FnKeyField) + v1 = libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpKeyinfo)).FnKeyField) } else { v1 = 0 } @@ -66821,11 +67003,11 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp iStore = 0 p = (*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdate if !(p != 0) || (*TPreUpdate)(unsafe.Pointer(p)).Fop == int32(SQLITE_DELETE) { - rc = _sqlite3MisuseError(tls, int32(93004)) + rc = _sqlite3MisuseError(tls, int32(93797)) goto preupdate_new_out } if (*TPreUpdate)(unsafe.Pointer(p)).FpPk != 0 && (*TPreUpdate)(unsafe.Pointer(p)).Fop != int32(SQLITE_UPDATE) { - iStore = int32(_sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx))) + iStore = _sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, iIdx) } else { iStore = int32(_sqlite3TableColumnToStorage(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpTab, int16(iIdx))) } @@ -66848,7 +67030,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if rc != SQLITE_OK { goto preupdate_new_out } - pUnpack = _vdbeUnpackRecord(tls, p+32, (*TMem)(unsafe.Pointer(pData)).Fn, (*TMem)(unsafe.Pointer(pData)).Fz) + pUnpack = _vdbeUnpackRecord(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpKeyinfo, (*TMem)(unsafe.Pointer(pData)).Fn, (*TMem)(unsafe.Pointer(pData)).Fz) if !(pUnpack != 0) { rc = int32(SQLITE_NOMEM) goto preupdate_new_out @@ -66997,7 +67179,7 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr break } } - Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5629, int32(3)) + Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5655, int32(3)) Xsqlite3_str_append(tls, bp+8, zStart, int32(int64(zRawSql)-int64(zStart))) } } else { @@ -67035,7 +67217,7 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+1426, libc.VaList(bp+104, *(*Ti64)(unsafe.Pointer(pVar)))) } else { if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pVar)).Fflags)&int32(MEM_Real) != 0 { - Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5134, libc.VaList(bp+104, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5160, libc.VaList(bp+104, *(*float64)(unsafe.Pointer(pVar)))) } else { if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pVar)).Fflags)&int32(MEM_Str) != 0 { /* Number of bytes of the string text to include in output */ enc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc @@ -67050,28 +67232,28 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr pVar = bp + 40 } nOut = (*TMem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5633, libc.VaList(bp+104, nOut, (*TMem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5659, libc.VaList(bp+104, nOut, (*TMem)(unsafe.Pointer(pVar)).Fz)) if libc.Int32FromUint8(enc) != int32(SQLITE_UTF8) { _sqlite3VdbeMemRelease(tls, bp+40) } } else { if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pVar)).Fflags)&int32(MEM_Zero) != 0 { - Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5640, libc.VaList(bp+104, *(*int32)(unsafe.Pointer(&(*TMem)(unsafe.Pointer(pVar)).Fu)))) + Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5666, libc.VaList(bp+104, *(*int32)(unsafe.Pointer(&(*TMem)(unsafe.Pointer(pVar)).Fu)))) } else { /* Number of bytes of the blob to include in output */ - Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5653, int32(2)) + Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5679, int32(2)) nOut1 = (*TMem)(unsafe.Pointer(pVar)).Fn i = 0 for { if !(i < nOut1) { break } - Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5656, libc.VaList(bp+104, int32(*(*int8)(unsafe.Pointer((*TMem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&int32(0xff))) + Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5682, libc.VaList(bp+104, int32(*(*int8)(unsafe.Pointer((*TMem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&int32(0xff))) goto _3 _3: ; i++ } - Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5661, int32(1)) + Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5687, int32(1)) } } } @@ -67235,9 +67417,9 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr // ** if we run out of memory. // */ func _allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType Tu8) (r uintptr) { - var nByte, v2 int32 - var pCx, pMem, v1, v3, v4 uintptr - _, _, _, _, _, _, _ = nByte, pCx, pMem, v1, v2, v3, v4 + var nByte Ti64 + var pCx, pMem, v1, v2, v3 uintptr + _, _, _, _, _, _ = nByte, pCx, pMem, v1, v2, v3 if iCur > 0 { v1 = (*TVdbe)(unsafe.Pointer(p)).FaMem + uintptr((*TVdbe)(unsafe.Pointer(p)).FnMem-iCur)*56 } else { @@ -67263,12 +67445,10 @@ func _allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurTyp */ pMem = v1 pCx = uintptr(0) + nByte = libc.Int64FromUint64((uint64(libc.UintptrFromInt32(0)+120)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7)) + libc.Uint64FromInt32(nField+libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)) if libc.Int32FromUint8(eCurType) == CURTYPE_BTREE { - v2 = _sqlite3BtreeCursorSize(tls) - } else { - v2 = 0 + nByte += int64(_sqlite3BtreeCursorSize(tls)) } - nByte = libc.Int32FromUint64(libc.Uint64FromInt64(128) + libc.Uint64FromInt32(2)*libc.Uint64FromInt64(4)*libc.Uint64FromInt32(nField) + libc.Uint64FromInt32(v2)) if *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) != 0 { /*OPTIMIZATION-IF-FALSE*/ _sqlite3VdbeFreeCursorNN(tls, p, *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8))) *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = uintptr(0) @@ -67277,28 +67457,28 @@ func _allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurTyp ** the pMem used to hold space for the cursor has enough storage available ** in pMem->zMalloc. But for the special case of the aMem[] entries used ** to hold cursors, it is faster to in-line the logic. */ - if (*TMem)(unsafe.Pointer(pMem)).FszMalloc < nByte { + if int64((*TMem)(unsafe.Pointer(pMem)).FszMalloc) < nByte { if (*TMem)(unsafe.Pointer(pMem)).FszMalloc > 0 { _sqlite3DbFreeNN(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, (*TMem)(unsafe.Pointer(pMem)).FzMalloc) } - v3 = _sqlite3DbMallocRaw(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, libc.Uint64FromInt32(nByte)) - (*TMem)(unsafe.Pointer(pMem)).FzMalloc = v3 - (*TMem)(unsafe.Pointer(pMem)).Fz = v3 + v2 = _sqlite3DbMallocRaw(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, libc.Uint64FromInt64(nByte)) + (*TMem)(unsafe.Pointer(pMem)).FzMalloc = v2 + (*TMem)(unsafe.Pointer(pMem)).Fz = v2 if (*TMem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) { (*TMem)(unsafe.Pointer(pMem)).FszMalloc = 0 return uintptr(0) } - (*TMem)(unsafe.Pointer(pMem)).FszMalloc = nByte + (*TMem)(unsafe.Pointer(pMem)).FszMalloc = int32(nByte) } - v4 = (*TMem)(unsafe.Pointer(pMem)).FzMalloc - pCx = v4 - *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = v4 + v3 = (*TMem)(unsafe.Pointer(pMem)).FzMalloc + pCx = v3 + *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = v3 libc.Xmemset(tls, pCx, 0, uint64(libc.UintptrFromInt32(0)+40)) (*TVdbeCursor)(unsafe.Pointer(pCx)).FeCurType = eCurType (*TVdbeCursor)(unsafe.Pointer(pCx)).FnField = int16(nField) (*TVdbeCursor)(unsafe.Pointer(pCx)).FaOffset = pCx + 120 + uintptr(nField)*4 if libc.Int32FromUint8(eCurType) == CURTYPE_BTREE { - *(*uintptr)(unsafe.Pointer(pCx + 48)) = (*TMem)(unsafe.Pointer(pMem)).Fz + uintptr(libc.Uint64FromInt64(128)+libc.Uint64FromInt32(2)*libc.Uint64FromInt64(4)*libc.Uint64FromInt32(nField)) + *(*uintptr)(unsafe.Pointer(pCx + 48)) = (*TMem)(unsafe.Pointer(pMem)).Fz + uintptr((uint64(libc.UintptrFromInt32(0)+120)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))+libc.Uint64FromInt32(nField+libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)) _sqlite3BtreeCursorZero(tls, *(*uintptr)(unsafe.Pointer(pCx + 48))) } return pCx @@ -67689,12 +67869,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { defer tls.Free(976) var aCol, aMem, aOffset, aOp, aPermute, aRoot, apArg, apArg1, db, pArgc, pBt, pBt1, pBt2, pBt3, pC, pC1, pC10, pC11, pC12, pC13, pC14, pC15, pC16, pC17, pC18, pC19, pC2, pC20, pC21, pC22, pC23, pC24, pC25, pC26, pC27, pC28, pC29, pC3, pC30, pC31, pC32, pC4, pC5, pC6, pC7, pC8, pC9, pCaller, pColl, pCrsr, pCrsr1, pCrsr2, pCrsr3, pCrsr4, pCrsr5, pCrsr6, pCrsr7, pCtx, pCtx1, pCtx2, pCur, pCur1, pCur2, pCur3, pCur4, pCur5, pCur6, pCx, pCx1, pCx2, pCx3, pData, pData0, pDb, pDb1, pDb2, pDb3, pDest, pDest1, pDest2, pEnd, pFrame, pFrame1, pFrame2, pFrame3, pFrame4, pIdxKey, pIn, pIn1, pIn2, pIn3, pKey, pKeyInfo, pKeyInfo1, pKeyInfo2, pLast, pMem, pMem1, pMem2, pMem3, pMem4, pModule, pModule1, pModule2, pModule3, pModule4, pModule5, pModule6, pName, pNew, pOp, pOrig, pOut, pPager, pProgram, pQuery, pRec, pReg, pRhs, pRt, pSavepoint, pSrc, pTab, pTab1, pTab2, pTab3, pTabCur, pTmp, pVCur1, pVTab, pVar, pVtab, pVtab1, pVtab2, pVtab3, pVtab4, pVtab5, pVtab6, pVtab7, pX, pX1, pnErr, t1, z1, z2, z3, zAffinity, zAffinity1, zData, zDb, zDb1, zEndHdr, zErr, zFilename, zHdr, zHdr1, zName, zPayload, zSchema, zSql, zTab, zTrace, v240, v241, v242, v250, v251, v252, v253, v255, v263, v278, v279, v286, v288, v297, v298, p189, p192, p193, p196, p199, p208, p209, p212, p227, p228, p229, p230, p231, p232, p233, p234, p235, p236, p237, p238, p239, p293, p294, p295, p296 uintptr var affinity int8 - var alreadyExists, bRev, c, c1, c2, cnt, cnt1, desiredAutoCommit, eNew, eOld, eqOnly, exists, i, i1, i2, i4, i5, i6, i7, i8, i9, iCompare, iCookie, iDb, iDb1, iDb2, iDb3, iQuery, iRollback, iSavepoint, iSet, ii, ii1, isLegacy, isSchemaChange, isTransaction, len1, n, n1, n2, n4, nArg, nArg1, nByte2, nField, nField1, nField2, nHdr, nKeyCol, nMem, nName, nRoot, nStep, nVarint, oc, opflags, p1, p11, p12, p13, p2, p21, pcDest, pcx, rc, res, res10, res11, res12, res21, savedAnalysisLimit, seekResult, v11, v21, wrFlag, v188, v191, v194, v197, v198, v205, v206, v207, v223, v224, v244, v245, v248, v249, v256, v260, v265, v266, v269, v270, v272, v273, v274, v275, v284, v287, v291 int32 + var alreadyExists, bRev, c, c1, c2, cnt, cnt1, desiredAutoCommit, eNew, eOld, eqOnly, exists, i, i1, i2, i4, i5, i6, i7, i8, i9, iCompare, iCookie, iDb, iDb1, iDb2, iDb3, iQuery, iRollback, iSavepoint, iSet, ii, ii1, isLegacy, isSchemaChange, isTransaction, len1, n, n1, n2, n4, nArg, nArg1, nField, nField1, nField2, nHdr, nKeyCol, nMem, nName, nRoot, nStep, nVarint, oc, opflags, p1, p11, p12, p13, p2, p21, pcDest, pcx, rc, res, res10, res11, res12, res21, savedAnalysisLimit, seekResult, v11, v21, wrFlag, v188, v191, v194, v197, v198, v205, v206, v207, v223, v224, v244, v245, v248, v249, v256, v260, v265, v266, v269, v270, v272, v273, v274, v275, v284, v287, v291 int32 var colCacheCtr, iAddr, iMap, iPrior, idx, len11, n3, p22, p23, serialType, serial_type, v213, v214, v216, v221, v222 Tu32 var encoding, isWriteLock, mTrace, op, p5, resetSchemaOnFault, vtabOnConflict, v225 Tu8 var flags1, flags11, flags2, flags3, flags31, newType, nullFlag, type1, type2, typeMask, v190 Tu16 var h, h1, iKey1, nAlloc, nData, nProgressLimit, nVmStep, offset64, uu Tu64 - var i3, iA, iB1, iKey, iKey2, nByte, nByte1, nCellKey, nZero, sz, v254, v262 Ti64 + var i3, iA, iB1, iKey, iKey2, nByte, nByte1, nByte2, nCellKey, nZero, sz, v254, v262 Ti64 var newMax, v211 uint32 var rA, rB float64 var xAuth Tsqlite3_xauth @@ -67711,7 +67891,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { var _ /* nChange at bp+616 */ Ti64 var _ /* nEntry at bp+96 */ Ti64 var _ /* nErr at bp+680 */ int32 - var _ /* nullFunc at bp+856 */ TFuncDef + var _ /* nullFunc at bp+848 */ TFuncDef var _ /* pVCur at bp+784 */ uintptr var _ /* pgno at bp+624 */ TPgno var _ /* r at bp+120 */ TUnpackedRecord @@ -67729,7 +67909,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { var _ /* res at bp+400 */ int32 var _ /* res at bp+456 */ int32 var _ /* rowid at bp+504 */ Ti64 - var _ /* rowid at bp+928 */ Tsqlite_int64 + var _ /* rowid at bp+920 */ Tsqlite_int64 var _ /* sContext at bp+800 */ Tsqlite3_context var _ /* sMem at bp+24 */ TMem var _ /* sMem at bp+728 */ TMem @@ -68443,19 +68623,19 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { if (*TVdbe)(unsafe.Pointer(p)).Frc != 0 { if (*TOp)(unsafe.Pointer(pOp)).Fp3 > 0 && int32((*TOp)(unsafe.Pointer(pOp)).Fp4type) == P4_NOTUSED { zErr = _sqlite3ValueText(tls, aMem+uintptr((*TOp)(unsafe.Pointer(pOp)).Fp3)*56, uint8(SQLITE_UTF8)) - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, zErr)) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, zErr)) } else { if (*TOp)(unsafe.Pointer(pOp)).Fp5 != 0 { - _sqlite3VdbeError(tls, p, __ccgo_ts+5697, libc.VaList(bp+944, _azType[libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5)-int32(1)])) + _sqlite3VdbeError(tls, p, __ccgo_ts+5723, libc.VaList(bp+936, _azType[libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5)-int32(1)])) if *(*uintptr)(unsafe.Pointer(pOp + 16)) != 0 { - (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+5718, libc.VaList(bp+944, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+5744, libc.VaList(bp+936, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) } } else { - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, *(*uintptr)(unsafe.Pointer(pOp + 16)))) } } pcx = int32((int64(pOp) - int64(aOp)) / 24) - Xsqlite3_log(tls, (*TOp)(unsafe.Pointer(pOp)).Fp1, __ccgo_ts+5725, libc.VaList(bp+944, pcx, (*TVdbe)(unsafe.Pointer(p)).FzSql, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*TOp)(unsafe.Pointer(pOp)).Fp1, __ccgo_ts+5751, libc.VaList(bp+936, pcx, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, (*TVdbe)(unsafe.Pointer(p)).FzSql)) } rc = _sqlite3VdbeHalt(tls, p) if rc == int32(SQLITE_BUSY) { @@ -69669,7 +69849,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { *(*Ti64)(unsafe.Pointer(pOut)) = ^_sqlite3VdbeIntValue(tls, pIn1) } goto _187 - /* Opcode: Once P1 P2 * * * + /* Opcode: Once P1 P2 P3 * * ** ** Fall through to the next instruction the first time this opcode is ** encountered on each invocation of the byte-code program. Jump to P2 @@ -69685,6 +69865,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { ** whether or not the jump should be taken. The bitmask is necessary ** because the self-altering code trick does not work for recursive ** triggers. + ** + ** The P3 operand is not used directly by this opcode. However P3 is + ** used by the code generator as follows: If this opcode is the start + ** of a subroutine and that subroutine uses a Bloom filter, then P3 will + ** be the register that holds that Bloom filter. See tag-202407032019 + ** in the source code for implementation details. */ _56: ; /* Address of this instruction */ @@ -70178,7 +70364,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { pOp = aOp + uintptr((*(*TOp)(unsafe.Pointer(aOp))).Fp3-int32(1))*24 goto _187 } else { - rc = _sqlite3CorruptError(tls, int32(96761)) + rc = _sqlite3CorruptError(tls, int32(97561)) goto abort_due_to_error } /* Opcode: TypeCheck P1 P2 P3 P4 * @@ -70281,7 +70467,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { goto vdbe_type_error vdbe_type_error: ; - _sqlite3VdbeError(tls, p, __ccgo_ts+5749, libc.VaList(bp+944, _vdbeMemTypeName(tls, pIn1), _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 8))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i2)*16))).FzCnName)) + _sqlite3VdbeError(tls, p, __ccgo_ts+5773, libc.VaList(bp+936, _vdbeMemTypeName(tls, pIn1), _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*16 + 8))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i2)*16))).FzCnName)) rc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(12)<<libc.Int32FromInt32(8) goto abort_due_to_error /* Opcode: Affinity P1 P2 * P4 * @@ -70687,7 +70873,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { /* A new savepoint cannot be created if there are active write ** statements (i.e. open read/write incremental blob handles). */ - _sqlite3VdbeError(tls, p, __ccgo_ts+5790, 0) + _sqlite3VdbeError(tls, p, __ccgo_ts+5814, 0) rc = int32(SQLITE_BUSY) } else { nName = _sqlite3Strlen30(tls, zName) @@ -70735,14 +70921,14 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { pSavepoint = (*TSavepoint)(unsafe.Pointer(pSavepoint)).FpNext } if !(pSavepoint != 0) { - _sqlite3VdbeError(tls, p, __ccgo_ts+5841, libc.VaList(bp+944, zName)) + _sqlite3VdbeError(tls, p, __ccgo_ts+5865, libc.VaList(bp+936, zName)) rc = int32(SQLITE_ERROR) } else { if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == int32(SAVEPOINT_RELEASE) { /* It is not possible to release (commit) a savepoint if there are ** active write statements. */ - _sqlite3VdbeError(tls, p, __ccgo_ts+5863, 0) + _sqlite3VdbeError(tls, p, __ccgo_ts+5887, 0) rc = int32(SQLITE_BUSY) } else { /* Determine whether or not this is a transaction savepoint. If so, @@ -70877,7 +71063,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { /* If this instruction implements a COMMIT and other VMs are writing ** return an error indicating that the other VMs must complete first. */ - _sqlite3VdbeError(tls, p, __ccgo_ts+5917, 0) + _sqlite3VdbeError(tls, p, __ccgo_ts+5941, 0) rc = int32(SQLITE_BUSY) goto abort_due_to_error } else { @@ -70907,12 +71093,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { goto vdbe_return } else { if !(desiredAutoCommit != 0) { - v250 = __ccgo_ts + 5972 + v250 = __ccgo_ts + 5996 } else { if iRollback != 0 { - v251 = __ccgo_ts + 6020 + v251 = __ccgo_ts + 6044 } else { - v251 = __ccgo_ts + 6063 + v251 = __ccgo_ts + 6087 } v250 = v251 } @@ -71004,7 +71190,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { ** SQL statement was prepared. */ _sqlite3DbFree(tls, db, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg) - (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3DbStrDup(tls, db, __ccgo_ts+6104) + (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3DbStrDup(tls, db, __ccgo_ts+6128) /* If the schema-cookie from the database file matches the cookie ** stored with the in-memory representation of the schema, do ** not reload the schema from the database file. @@ -72115,7 +72301,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { (*TVdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 248)) if *(*int32)(unsafe.Pointer(bp + 248)) != 0 { if (*TOp)(unsafe.Pointer(pOp)).Fp2 == 0 { - rc = _sqlite3CorruptError(tls, int32(99022)) + rc = _sqlite3CorruptError(tls, int32(99822)) } else { goto jump_to_p2 } @@ -72574,7 +72760,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { /* The OP_RowData opcodes always follow OP_NotExists or ** OP_SeekRowid or OP_Rewind/Op_Next with no intervening instructions ** that might invalidate the cursor. - ** If this where not the case, on of the following assert()s + ** If this were not the case, one of the following assert()s ** would fail. Should this ever change (because of changes in the code ** generator) then the fix would be to insert a call to ** sqlite3VdbeCursorMoveto(). @@ -73007,7 +73193,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { } } else { if (*TOp)(unsafe.Pointer(pOp)).Fp5 != 0 && !(_sqlite3WritableSchema(tls, db) != 0) { - rc = _sqlite3ReportError(tls, libc.Int32FromInt32(SQLITE_CORRUPT)|libc.Int32FromInt32(3)<<libc.Int32FromInt32(8), int32(100114), __ccgo_ts+6132) + rc = _sqlite3ReportError(tls, libc.Int32FromInt32(SQLITE_CORRUPT)|libc.Int32FromInt32(3)<<libc.Int32FromInt32(8), int32(100914), __ccgo_ts+6156) goto abort_due_to_error } } @@ -73162,7 +73348,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { /* nCellKey will always be between 0 and 0xffffffff because of the way ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */ if nCellKey <= 0 || nCellKey > int64(0x7fffffff) { - rc = _sqlite3CorruptError(tls, int32(100319)) + rc = _sqlite3CorruptError(tls, int32(101119)) goto abort_due_to_error } _sqlite3VdbeMemInit(tls, bp+552, db, uint16(0)) @@ -73337,7 +73523,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { (*Tsqlite3)(unsafe.Pointer(db)).FmTrace = mTrace (*Tsqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = savedAnalysisLimit if *(*uintptr)(unsafe.Pointer(bp + 632)) != 0 || rc != 0 { - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, *(*uintptr)(unsafe.Pointer(bp + 632)))) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, *(*uintptr)(unsafe.Pointer(bp + 632)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 632))) if rc == int32(SQLITE_NOMEM) { goto no_mem @@ -73368,13 +73554,13 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { *(*Tu32)(unsafe.Pointer(db + 44)) |= uint32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+200, libc.Uint32FromInt32(0), 0, 0x3) } else { - zSchema = __ccgo_ts + 6149 + zSchema = __ccgo_ts + 6173 (*(*TInitData)(unsafe.Pointer(bp + 640))).Fdb = db (*(*TInitData)(unsafe.Pointer(bp + 640))).FiDb = iDb3 (*(*TInitData)(unsafe.Pointer(bp + 640))).FpzErrMsg = p + 168 (*(*TInitData)(unsafe.Pointer(bp + 640))).FmInitFlags = uint32(0) (*(*TInitData)(unsafe.Pointer(bp + 640))).FmxPage = _sqlite3BtreeLastPage(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb3)*32))).FpBt) - zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+6163, libc.VaList(bp+944, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb3)*32))).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+6187, libc.VaList(bp+936, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb3)*32))).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if zSql == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { @@ -73389,7 +73575,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { /* The OP_ParseSchema opcode with a non-NULL P4 argument should parse ** at least one SQL statement. Any less than that indicates that ** the sqlite_schema table is corrupt. */ - rc = _sqlite3CorruptError(tls, int32(100612)) + rc = _sqlite3CorruptError(tls, int32(101412)) } _sqlite3DbFreeNN(tls, db, zSql) (*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy = uint8(0) @@ -73626,7 +73812,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { } if (*TVdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4)) { rc = int32(SQLITE_ERROR) - _sqlite3VdbeError(tls, p, __ccgo_ts+6206, 0) + _sqlite3VdbeError(tls, p, __ccgo_ts+6230, 0) goto abort_due_to_error } /* Register pRt is used to store the memory required to save the state @@ -73643,15 +73829,15 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { if (*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0 { nMem++ } - nByte2 = libc.Int32FromUint64((libc.Uint64FromInt64(112)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7)) + libc.Uint64FromInt32(nMem)*uint64(56) + libc.Uint64FromInt32((*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr)*uint64(8) + libc.Uint64FromInt32(((*TSubProgram)(unsafe.Pointer(pProgram)).FnOp+int32(7))/int32(8))) - pFrame2 = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte2)) + nByte2 = libc.Int64FromUint64(uint64((libc.Uint64FromInt64(112)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))+libc.Uint64FromInt32(nMem)*uint64(56)+libc.Uint64FromInt32((*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr)*uint64(8)) + libc.Uint64FromInt64((int64(7)+int64((*TSubProgram)(unsafe.Pointer(pProgram)).FnOp))/int64(8))) + pFrame2 = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte2)) if !(pFrame2 != 0) { goto no_mem } _sqlite3VdbeMemRelease(tls, pRt) (*TMem)(unsafe.Pointer(pRt)).Fflags = libc.Uint16FromInt32(libc.Int32FromInt32(MEM_Blob) | libc.Int32FromInt32(MEM_Dyn)) (*TMem)(unsafe.Pointer(pRt)).Fz = pFrame2 - (*TMem)(unsafe.Pointer(pRt)).Fn = nByte2 + (*TMem)(unsafe.Pointer(pRt)).Fn = int32(nByte2) (*TMem)(unsafe.Pointer(pRt)).FxDel = __ccgo_fp(_sqlite3VdbeFrameMemDel) (*TVdbeFrame)(unsafe.Pointer(pFrame2)).Fv = p (*TVdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem = nMem @@ -73732,11 +73918,11 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { */ _144: ; - if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 { - *(*Ti64)(unsafe.Pointer(db + 792)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2) + if (*TOp)(unsafe.Pointer(pOp)).Fp1 != 0 { + *(*Ti64)(unsafe.Pointer(db + 784)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2) } else { - if (*TOp)(unsafe.Pointer(pOp)).Fp1 != 0 { - *(*Ti64)(unsafe.Pointer(db + 784)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2) + if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 { + *(*Ti64)(unsafe.Pointer(db + 792)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2) } else { *(*Ti64)(unsafe.Pointer(p + 80)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2) } @@ -73948,7 +74134,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { ** ** Note: We could avoid this by using a regular memory cell from aMem[] for ** the accumulator, instead of allocating one here. */ - nAlloc = uint64(libc.Uint64FromInt64(56) + libc.Uint64FromInt32(n4-libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)) + nAlloc = uint64(uint64(libc.UintptrFromInt32(0)+48) + libc.Uint64FromInt32(n4)*libc.Uint64FromInt64(8)) pCtx = _sqlite3DbMallocRawNN(tls, db, nAlloc+uint64(56)) if pCtx == uintptr(0) { goto no_mem @@ -73998,7 +74184,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { } /* IMP: R-24505-23230 */ if (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0 { if (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0 { - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, Xsqlite3_value_text(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, Xsqlite3_value_text(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FisError } if (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0 { @@ -74054,7 +74240,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { rc = _sqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16))) } if rc != 0 { - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, Xsqlite3_value_text(tls, pMem3))) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, Xsqlite3_value_text(tls, pMem3))) goto abort_due_to_error } _sqlite3VdbeChangeEncoding(tls, pMem3, libc.Int32FromUint8(encoding)) @@ -74133,11 +74319,11 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) || (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeRead > int32(1) { rc = int32(SQLITE_ERROR) if eNew == int32(PAGER_JOURNALMODE_WAL) { - v286 = __ccgo_ts + 6243 + v286 = __ccgo_ts + 6267 } else { - v286 = __ccgo_ts + 6248 + v286 = __ccgo_ts + 6272 } - _sqlite3VdbeError(tls, p, __ccgo_ts+6255, libc.VaList(bp+944, v286)) + _sqlite3VdbeError(tls, p, __ccgo_ts+6279, libc.VaList(bp+936, v286)) goto abort_due_to_error } else { if eOld == int32(PAGER_JOURNALMODE_WAL) { @@ -74290,7 +74476,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { if rc != 0 { if rc&int32(0xFF) == int32(SQLITE_LOCKED) { z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - _sqlite3VdbeError(tls, p, __ccgo_ts+6307, libc.VaList(bp+944, z1)) + _sqlite3VdbeError(tls, p, __ccgo_ts+6331, libc.VaList(bp+936, z1)) } goto abort_due_to_error } @@ -74452,7 +74638,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { (*TValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*TOp)(unsafe.Pointer(pOp)).Fp3)*56 pOut = _out2Prerelease(tls, p, pOp) (*TMem)(unsafe.Pointer(pOut)).Fflags = uint16(MEM_Null) - _sqlite3VdbeMemSetPointer(tls, pOut, pRhs, __ccgo_ts+6336, __ccgo_fp(_sqlite3VdbeValueListFree)) + _sqlite3VdbeMemSetPointer(tls, pOut, pRhs, __ccgo_ts+6360, __ccgo_fp(_sqlite3VdbeValueListFree)) goto _187 /* Opcode: VFilter P1 P2 P3 P4 * ** Synopsis: iplan=r[P3] zplan='P4' @@ -74532,12 +74718,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { } pVtab4 = (*Tsqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Tsqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule - libc.Xmemset(tls, bp+800, 0, uint64(56)) + libc.Xmemset(tls, bp+800, 0, uint64(48)) (*(*Tsqlite3_context)(unsafe.Pointer(bp + 800))).FpOut = pDest2 (*(*Tsqlite3_context)(unsafe.Pointer(bp + 800))).Fenc = encoding - (*(*TFuncDef)(unsafe.Pointer(bp + 856))).FpUserData = uintptr(0) - (*(*TFuncDef)(unsafe.Pointer(bp + 856))).FfuncFlags = uint32(SQLITE_RESULT_SUBTYPE) - (*(*Tsqlite3_context)(unsafe.Pointer(bp + 800))).FpFunc = bp + 856 + (*(*TFuncDef)(unsafe.Pointer(bp + 848))).FpUserData = uintptr(0) + (*(*TFuncDef)(unsafe.Pointer(bp + 848))).FfuncFlags = uint32(SQLITE_RESULT_SUBTYPE) + (*(*Tsqlite3_context)(unsafe.Pointer(bp + 800))).FpFunc = bp + 848 if libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5)&int32(OPFLAG_NOCHNG) != 0 { _sqlite3VdbeMemSetNull(tls, pDest2) (*TMem)(unsafe.Pointer(pDest2)).Fflags = libc.Uint16FromInt32(libc.Int32FromInt32(MEM_Null) | libc.Int32FromInt32(MEM_Zero)) @@ -74548,7 +74734,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_module)(unsafe.Pointer(pModule4)).FxColumn})))(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48)), bp+800, (*TOp)(unsafe.Pointer(pOp)).Fp2) _sqlite3VtabImportErrmsg(tls, p, pVtab4) if (*(*Tsqlite3_context)(unsafe.Pointer(bp + 800))).FisError > 0 { - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, Xsqlite3_value_text(tls, pDest2))) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, Xsqlite3_value_text(tls, pDest2))) rc = (*(*Tsqlite3_context)(unsafe.Pointer(bp + 800))).FisError } _sqlite3VdbeChangeEncoding(tls, pDest2, libc.Int32FromUint8(encoding)) @@ -74642,7 +74828,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { */ _174: ; - *(*Tsqlite_int64)(unsafe.Pointer(bp + 928)) = 0 + *(*Tsqlite_int64)(unsafe.Pointer(bp + 920)) = 0 if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { goto no_mem } @@ -74670,11 +74856,11 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { i7++ } (*Tsqlite3)(unsafe.Pointer(db)).FvtabOnConflict = uint8((*TOp)(unsafe.Pointer(pOp)).Fp5) - rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_module)(unsafe.Pointer(pModule6)).FxUpdate})))(tls, pVtab7, nArg1, apArg1, bp+928) + rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_module)(unsafe.Pointer(pModule6)).FxUpdate})))(tls, pVtab7, nArg1, apArg1, bp+920) (*Tsqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict _sqlite3VtabImportErrmsg(tls, p, pVtab7) if rc == SQLITE_OK && (*TOp)(unsafe.Pointer(pOp)).Fp1 != 0 { - (*Tsqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Tsqlite_int64)(unsafe.Pointer(bp + 928)) + (*Tsqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Tsqlite_int64)(unsafe.Pointer(bp + 920)) } if rc&int32(0xff) == int32(SQLITE_CONSTRAINT) && (*TVTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0 { if libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5) == int32(OE_Ignore) { @@ -74802,7 +74988,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { /* If the function returned an error, throw an exception */ if (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0 { if (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0 { - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, Xsqlite3_value_text(tls, pOut))) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, Xsqlite3_value_text(tls, pOut))) rc = (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FisError } _sqlite3VdbeDeleteAuxData(tls, db, p+296, (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*TOp)(unsafe.Pointer(pOp)).Fp1) @@ -74953,7 +75139,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) { Xsqlite3_free(tls, z2) } else { if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeExec > int32(1) { - z3 = _sqlite3MPrintf(tls, db, __ccgo_ts+6346, libc.VaList(bp+944, zTrace)) + z3 = _sqlite3MPrintf(tls, db, __ccgo_ts+6370, libc.VaList(bp+936, zTrace)) (*(*func(*libc.TLS, Tu32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(&(*Tsqlite3)(unsafe.Pointer(db)).Ftrace))})))(tls, uint32(SQLITE_TRACE_STMT), (*Tsqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) _sqlite3DbFree(tls, db, z3) } else { @@ -75040,15 +75226,15 @@ abort_due_to_error: rc = int32(SQLITE_NOMEM) } else { if rc == libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(33)<<libc.Int32FromInt32(8) { - rc = _sqlite3CorruptError(tls, int32(102670)) + rc = _sqlite3CorruptError(tls, int32(103474)) } } if (*TVdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(12)<<libc.Int32FromInt32(8) { - _sqlite3VdbeError(tls, p, __ccgo_ts+3862, libc.VaList(bp+944, _sqlite3ErrStr(tls, rc))) + _sqlite3VdbeError(tls, p, __ccgo_ts+3888, libc.VaList(bp+936, _sqlite3ErrStr(tls, rc))) } (*TVdbe)(unsafe.Pointer(p)).Frc = rc _sqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, __ccgo_ts+6352, libc.VaList(bp+944, int32((int64(pOp)-int64(aOp))/24), (*TVdbe)(unsafe.Pointer(p)).FzSql, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, rc, __ccgo_ts+6376, libc.VaList(bp+936, int32((int64(pOp)-int64(aOp))/24), (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, (*TVdbe)(unsafe.Pointer(p)).FzSql)) if libc.Int32FromUint8((*TVdbe)(unsafe.Pointer(p)).FeVdbeState) == int32(VDBE_RUN_STATE) { _sqlite3VdbeHalt(tls, p) } @@ -75087,7 +75273,7 @@ vdbe_return: goto too_big too_big: ; - _sqlite3VdbeError(tls, p, __ccgo_ts+5506, 0) + _sqlite3VdbeError(tls, p, __ccgo_ts+5532, 0) rc = int32(SQLITE_TOOBIG) goto abort_due_to_error /* Jump to here if a malloc() fails. @@ -75111,10 +75297,10 @@ abort_due_to_interrupt: } var _azType = [4]uintptr{ - 0: __ccgo_ts + 5663, - 1: __ccgo_ts + 5672, - 2: __ccgo_ts + 5679, - 3: __ccgo_ts + 5685, + 0: __ccgo_ts + 5689, + 1: __ccgo_ts + 5698, + 2: __ccgo_ts + 5705, + 3: __ccgo_ts + 5711, } var _and_logic = [9]uint8{ @@ -75268,13 +75454,13 @@ func _blobSeekToRow(tls *libc.TLS, p uintptr, iRow Tsqlite3_int64, pzErr uintptr v2 = __ccgo_ts + 1651 } else { if type1 == uint32(7) { - v3 = __ccgo_ts + 6384 + v3 = __ccgo_ts + 6409 } else { - v3 = __ccgo_ts + 6389 + v3 = __ccgo_ts + 6414 } v2 = v3 } - zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6397, libc.VaList(bp+8, v2)) + zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6422, libc.VaList(bp+8, v2)) rc = int32(SQLITE_ERROR) Xsqlite3_finalize(tls, (*TIncrblob)(unsafe.Pointer(p)).FpStmt) (*TIncrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) @@ -75292,10 +75478,10 @@ func _blobSeekToRow(tls *libc.TLS, p uintptr, iRow Tsqlite3_int64, pzErr uintptr rc = Xsqlite3_finalize(tls, (*TIncrblob)(unsafe.Pointer(p)).FpStmt) (*TIncrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) if rc == SQLITE_OK { - zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6426, libc.VaList(bp+8, iRow)) + zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6451, libc.VaList(bp+8, iRow)) rc = int32(SQLITE_ERROR) } else { - zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb))) + zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb))) } } } @@ -75311,11 +75497,12 @@ func _blobSeekToRow(tls *libc.TLS, p uintptr, iRow Tsqlite3_int64, pzErr uintptr func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Tsqlite_int64, wrFlag int32, ppBlob uintptr) (r int32) { bp := tls.Alloc(448) defer tls.Free(448) - var aOp, pBlob, pFKey, pIdx, pTab, v, zFault, v7 uintptr - var iCol, iDb, j, j1, nAttempt, rc, v6 int32 + var aOp, pBlob, pFKey, pIdx, pTab, v, zFault, v8 uintptr + var iCol, iDb, j, j1, nAttempt, rc, v1, v7 int32 + var v2 bool var _ /* sParse at bp+8 */ TParse var _ /* zErr at bp+0 */ uintptr - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aOp, iCol, iDb, j, j1, nAttempt, pBlob, pFKey, pIdx, pTab, rc, v, zFault, v6, v7 + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aOp, iCol, iDb, j, j1, nAttempt, pBlob, pFKey, pIdx, pTab, rc, v, zFault, v1, v2, v7, v8 nAttempt = 0 /* Index of zColumn in row-record */ rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) @@ -75335,21 +75522,25 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, pTab = _sqlite3LocateTable(tls, bp+8, uint32(0), zTable, zDb) if pTab != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { pTab = uintptr(0) - _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6446, libc.VaList(bp+440, zTable)) + _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6471, libc.VaList(bp+440, zTable)) } if pTab != 0 && !((*TTable)(unsafe.Pointer(pTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) { pTab = uintptr(0) - _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6476, libc.VaList(bp+440, zTable)) + _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6501, libc.VaList(bp+440, zTable)) } if pTab != 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_HasGenerated) != uint32(0) { pTab = uintptr(0) - _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6512, libc.VaList(bp+440, zTable)) + _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6537, libc.VaList(bp+440, zTable)) } if pTab != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { pTab = uintptr(0) - _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6557, libc.VaList(bp+440, zTable)) + _sqlite3ErrorMsg(tls, bp+8, __ccgo_ts+6582, libc.VaList(bp+440, zTable)) } - if !(pTab != 0) { + if v2 = pTab == uintptr(0); !v2 { + v1 = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema) + iDb = v1 + } + if v2 || v1 == int32(1) && _sqlite3OpenTempDatabase(tls, bp+8) != 0 { if (*(*TParse)(unsafe.Pointer(bp + 8))).FzErrMsg != 0 { _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) *(*uintptr)(unsafe.Pointer(bp)) = (*(*TParse)(unsafe.Pointer(bp + 8))).FzErrMsg @@ -75360,24 +75551,12 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, goto blob_open_out } (*TIncrblob)(unsafe.Pointer(pBlob)).FpTab = pTab - (*TIncrblob)(unsafe.Pointer(pBlob)).FzDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(_sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema))*32))).FzDbSName + (*TIncrblob)(unsafe.Pointer(pBlob)).FzDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName /* Now search pTab for the exact column. */ - iCol = 0 - for { - if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } - if _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName, zColumn) == 0 { - break - } - goto _1 - _1: - ; - iCol++ - } - if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { + iCol = _sqlite3ColumnIndex(tls, pTab, zColumn) + if iCol < 0 { _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) - *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6578, libc.VaList(bp+440, zColumn)) + *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6603, libc.VaList(bp+440, zColumn)) rc = int32(SQLITE_ERROR) _sqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -75403,15 +75582,15 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, break } if (*(*TsColMap)(unsafe.Pointer(pFKey + 64 + uintptr(j)*16))).FiFrom == iCol { - zFault = __ccgo_ts + 6599 + zFault = __ccgo_ts + 6624 } - goto _3 - _3: + goto _4 + _4: ; j++ } - goto _2 - _2: + goto _3 + _3: ; pFKey = (*TFKey)(unsafe.Pointer(pFKey)).FpNextFrom } @@ -75428,21 +75607,21 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, } /* FIXME: Be smarter about indexes that use expressions */ if int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == iCol || int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == -int32(2) { - zFault = __ccgo_ts + 6611 + zFault = __ccgo_ts + 6636 } - goto _5 - _5: + goto _6 + _6: ; j1++ } - goto _4 - _4: + goto _5 + _5: ; pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext } if zFault != 0 { _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) - *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6619, libc.VaList(bp+440, zFault)) + *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6644, libc.VaList(bp+440, zFault)) rc = int32(SQLITE_ERROR) _sqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -75451,7 +75630,6 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, (*TIncrblob)(unsafe.Pointer(pBlob)).FpStmt = _sqlite3VdbeCreate(tls, bp+8) if (*TIncrblob)(unsafe.Pointer(pBlob)).FpStmt != 0 { v = (*TIncrblob)(unsafe.Pointer(pBlob)).FpStmt - iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema) _sqlite3VdbeAddOp4Int(tls, v, int32(OP_Transaction), iDb, wrFlag, (*TSchema)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FpSchema)).Fschema_cookie, (*TSchema)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FpSchema)).FiGeneration) _sqlite3VdbeChangeP5(tls, v, uint16(1)) aOp = _sqlite3VdbeAddOpList(tls, v, libc.Int32FromUint64(libc.Uint64FromInt64(24)/libc.Uint64FromInt64(4)), uintptr(unsafe.Pointer(&_openBlob)), _iLn) @@ -75496,8 +75674,8 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, } rc = _blobSeekToRow(tls, pBlob, iRow, bp) nAttempt++ - v6 = nAttempt - if v6 >= int32(SQLITE_MAX_SCHEMA_RETRY) || rc != int32(SQLITE_SCHEMA) { + v7 = nAttempt + if v7 >= int32(SQLITE_MAX_SCHEMA_RETRY) || rc != int32(SQLITE_SCHEMA) { break } _sqlite3ParseObjectReset(tls, bp+8) @@ -75514,11 +75692,11 @@ blob_open_out: _sqlite3DbFree(tls, db, pBlob) } if *(*uintptr)(unsafe.Pointer(bp)) != 0 { - v7 = __ccgo_ts + 3862 + v8 = __ccgo_ts + 3888 } else { - v7 = libc.UintptrFromInt32(0) + v8 = libc.UintptrFromInt32(0) } - _sqlite3ErrorWithMsg(tls, db, rc, v7, libc.VaList(bp+440, *(*uintptr)(unsafe.Pointer(bp)))) + _sqlite3ErrorWithMsg(tls, db, rc, v8, libc.VaList(bp+440, *(*uintptr)(unsafe.Pointer(bp)))) _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) _sqlite3ParseObjectReset(tls, bp+8) rc = _sqlite3ApiExit(tls, db, rc) @@ -75604,7 +75782,7 @@ func _blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset in _, _, _, _, _ = db, iKey, p, rc, v p = pBlob if p == uintptr(0) { - return _sqlite3MisuseError(tls, int32(103159)) + return _sqlite3MisuseError(tls, int32(103962)) } db = (*TIncrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75703,7 +75881,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Tsqlite3_int64) (r _, _, _, _ = db, p, rc, v1 p = pBlob if p == uintptr(0) { - return _sqlite3MisuseError(tls, int32(103259)) + return _sqlite3MisuseError(tls, int32(104062)) } db = (*TIncrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75717,7 +75895,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Tsqlite3_int64) (r rc = _blobSeekToRow(tls, p, iRow, bp) if rc != SQLITE_OK { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { - v1 = __ccgo_ts + 3862 + v1 = __ccgo_ts + 3888 } else { v1 = libc.UintptrFromInt32(0) } @@ -76164,11 +76342,12 @@ type TVdbeSorter1 = struct { FiPrev Tu8 FnTask Tu8 FtypeMask Tu8 - FaTask [1]TSortSubtask } type VdbeSorter1 = TVdbeSorter1 +/* Size (in bytes) of a VdbeSorter object that works with N or fewer subtasks */ + /* ** An instance of the following object is used to read records out of a ** PMA, in sorted order. The next key to be read is cached in nKey/aKey. @@ -76775,8 +76954,8 @@ var _aLen = [10]Tu8{ // ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. // */ func _sqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) (r int32) { - var i, nWorker, pgsz, rc, sz, szKeyInfo, v2, v5 int32 - var mxCache Ti64 + var i, nWorker, pgsz, rc, szKeyInfo, v2, v5 int32 + var mxCache, sz Ti64 var pBt, pKeyInfo, pSorter, pTask, v1 uintptr var szPma Tu32 var v4 int64 @@ -76790,9 +76969,9 @@ func _sqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } /* Do not allow the total number of threads (main thread + all workers) ** to exceed the maximum merge count */ - szKeyInfo = libc.Int32FromUint64(uint64(40) + libc.Uint64FromInt32(libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*TVdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo)).FnKeyField)-libc.Int32FromInt32(1))*uint64(8)) - sz = libc.Int32FromUint64(uint64(192) + libc.Uint64FromInt32(nWorker)*uint64(96)) - pSorter = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(sz+szKeyInfo)) + szKeyInfo = libc.Int32FromUint64(uint64(libc.UintptrFromInt32(0)+32) + uint64((*TKeyInfo)(unsafe.Pointer((*TVdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo)).FnKeyField)*libc.Uint64FromInt64(8)) + sz = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+96) + libc.Uint64FromInt32(nWorker+libc.Int32FromInt32(1))*libc.Uint64FromInt64(96)) + pSorter = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(sz+int64(szKeyInfo))) *(*uintptr)(unsafe.Pointer(pCsr + 48)) = pSorter if pSorter == uintptr(0) { rc = int32(SQLITE_NOMEM) @@ -76990,18 +77169,19 @@ func _vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) (r int32) { // ** nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. // */ func _vdbeMergeEngineNew(tls *libc.TLS, nReader int32) (r uintptr) { - var N, nByte int32 + var N int32 + var nByte Ti64 var pNew, v1 uintptr _, _, _, _ = N, nByte, pNew, v1 N = int32(2) /* Pointer to allocated object to return */ for N < nReader { N += N } - nByte = libc.Int32FromUint64(uint64(32) + libc.Uint64FromInt32(N)*(libc.Uint64FromInt64(4)+libc.Uint64FromInt64(80))) + nByte = libc.Int64FromUint64(uint64(32) + libc.Uint64FromInt32(N)*(libc.Uint64FromInt64(4)+libc.Uint64FromInt64(80))) if _sqlite3FaultSim(tls, int32(100)) != 0 { v1 = uintptr(0) } else { - v1 = _sqlite3MallocZero(tls, libc.Uint64FromInt32(nByte)) + v1 = _sqlite3MallocZero(tls, libc.Uint64FromInt64(nByte)) } pNew = v1 if pNew != 0 { @@ -77289,6 +77469,9 @@ func _vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) (r int32) { break } p = _vdbeSorterMerge(tls, pTask, p, (*(*[64]uintptr)(unsafe.Pointer(bp)))[i]) + /* ,--Each aSlot[] holds twice as much as the previous. So we cannot use + ** | up all 64 aSlots[] with only a 64-bit address space. + ** v */ (*(*[64]uintptr)(unsafe.Pointer(bp)))[i] = uintptr(0) goto _1 _1: @@ -79834,25 +80017,25 @@ func _extendFJMatch(tls *libc.TLS, pParse uintptr, ppList uintptr, pMatch uintpt func _isValidSchemaTableName(tls *libc.TLS, zTab uintptr, pTab uintptr, zDb uintptr) (r int32) { var zLegacy uintptr _ = zLegacy - if Xsqlite3_strnicmp(tls, zTab, __ccgo_ts+6653, int32(7)) != 0 { + if Xsqlite3_strnicmp(tls, zTab, __ccgo_ts+6678, int32(7)) != 0 { return 0 } zLegacy = (*TTable)(unsafe.Pointer(pTab)).FzName - if libc.Xstrcmp(tls, zLegacy+uintptr(7), __ccgo_ts+6661+7) == 0 { - if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6680+7) == 0 { + if libc.Xstrcmp(tls, zLegacy+uintptr(7), __ccgo_ts+6686+7) == 0 { + if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6705+7) == 0 { return int32(1) } if zDb == uintptr(0) { return 0 } - if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6149+7) == 0 { + if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6173+7) == 0 { return int32(1) } - if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6699+7) == 0 { + if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6724+7) == 0 { return int32(1) } } else { - if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6699+7) == 0 { + if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6724+7) == 0 { return int32(1) } } @@ -79891,23 +80074,22 @@ func _isValidSchemaTableName(tls *libc.TLS, zTab uintptr, pTab uintptr, zDb uint func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRight uintptr, pNC uintptr, pExpr uintptr) (r int32) { bp := tls.Alloc(64) defer tls.Free(64) - var cnt, cntTab, eNewExprOp, hit, i, iCol, j, nSubquery, op, v5 int32 - var db, pCol, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v10 uintptr - var hCol, hCol1 Tu8 - var v7, v8 uint32 + var cnt, cntTab, eNewExprOp, hit, i, iCol, j, nSubquery, op, v4 int32 + var db, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v8 uintptr + var v5, v6 uint32 var _ /* bRowid at bp+8 */ int32 var _ /* pFJMatch at bp+0 */ uintptr - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = cnt, cntTab, db, eNewExprOp, hCol, hCol1, hit, i, iCol, j, nSubquery, op, pCol, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v10, v5, v7, v8 /* Loop counters */ - cnt = 0 /* Number of matching column names */ - cntTab = 0 /* Number of potential "rowid" matches */ - nSubquery = 0 /* How many levels of subquery */ - db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* Use for looping over pSrcList items */ - pMatch = uintptr(0) /* The matching pSrcList item */ - pTopNC = pNC /* First namecontext in the list */ - pSchema = uintptr(0) /* Schema of the expression */ - eNewExprOp = int32(TK_COLUMN) /* New value for pExpr->op on success */ - pTab = uintptr(0) /* A column of pTab */ - *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* Matches for FULL JOIN .. USING */ + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = cnt, cntTab, db, eNewExprOp, hit, i, iCol, j, nSubquery, op, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v4, v5, v6, v8 /* Loop counters */ + cnt = 0 /* Number of matching column names */ + cntTab = 0 /* Number of potential "rowid" matches */ + nSubquery = 0 /* How many levels of subquery */ + db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* Use for looping over pSrcList items */ + pMatch = uintptr(0) /* The matching pSrcList item */ + pTopNC = pNC /* First namecontext in the list */ + pSchema = uintptr(0) /* Schema of the expression */ + eNewExprOp = int32(TK_COLUMN) /* New value for pExpr->op on success */ + pTab = uintptr(0) /* Table holding the row */ + *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* Matches for FULL JOIN .. USING */ zCol = *(*uintptr)(unsafe.Pointer(pRight + 8)) /* the name context cannot be NULL. */ /* The Z in X.Y.Z cannot be NULL */ @@ -79939,7 +80121,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh ; i++ } - if i == (*Tsqlite3)(unsafe.Pointer(db)).FnDb && _sqlite3StrICmp(tls, __ccgo_ts+6713, zDb) == 0 { + if i == (*Tsqlite3)(unsafe.Pointer(db)).FnDb && _sqlite3StrICmp(tls, __ccgo_ts+6738, zDb) == 0 { /* This branch is taken when the main database has been renamed ** using SQLITE_DBCONFIG_MAINDBNAME. */ pSchema = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FpSchema @@ -80033,7 +80215,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh if (*TTable)(unsafe.Pointer(pTab)).FpSchema != pSchema { goto _2 } - if pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, __ccgo_ts+6718) != 0 { + if pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, __ccgo_ts+6743) != 0 { goto _2 } } @@ -80055,57 +80237,44 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh _sqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr+64) } } - hCol = _sqlite3StrIHash(tls, zCol) - j = 0 - pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol - for { - if !(j < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } - if libc.Int32FromUint8((*TColumn)(unsafe.Pointer(pCol)).FhName) == libc.Int32FromUint8(hCol) && _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 { - if cnt > 0 { - if int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x800>>11) == 0 || _sqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pItem + 64)), zCol) < 0 { - /* Two or more tables have the same column name which is - ** not joined by USING. This is an error. Signal as much - ** by clearing pFJMatch and letting cnt go above 1. */ - _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp))) - *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) + j = _sqlite3ColumnIndex(tls, pTab, zCol) + if j >= 0 { + if cnt > 0 { + if int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x800>>11) == 0 || _sqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pItem + 64)), zCol) < 0 { + /* Two or more tables have the same column name which is + ** not joined by USING. This is an error. Signal as much + ** by clearing pFJMatch and letting cnt go above 1. */ + _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp))) + *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) + } else { + if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_RIGHT) == 0 { + /* An INNER or LEFT JOIN. Use the left-most table */ + goto _2 } else { - if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_RIGHT) == 0 { - /* An INNER or LEFT JOIN. Use the left-most table */ - goto _4 + if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_LEFT) == 0 { + /* A RIGHT JOIN. Use the right-most table */ + cnt = 0 + _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp))) + *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } else { - if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_LEFT) == 0 { - /* A RIGHT JOIN. Use the right-most table */ - cnt = 0 - _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp))) - *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - } else { - /* For a FULL JOIN, we must construct a coalesce() func */ - _extendFJMatch(tls, pParse, bp, pMatch, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn) - } + /* For a FULL JOIN, we must construct a coalesce() func */ + _extendFJMatch(tls, pParse, bp, pMatch, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn) } } } - cnt++ - pMatch = pItem - /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */ - if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { - v5 = -int32(1) - } else { - v5 = int32(int16(j)) - } - (*TExpr)(unsafe.Pointer(pExpr)).FiColumn = int16(v5) - if int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x4000>>14) != 0 { - _sqlite3SrcItemColumnUsed(tls, pItem, j) - } - break } - goto _4 - _4: - ; - j++ - pCol += 16 + cnt++ + pMatch = pItem + /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */ + if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { + v4 = -int32(1) + } else { + v4 = int32(int16(j)) + } + (*TExpr)(unsafe.Pointer(pExpr)).FiColumn = int16(v4) + if int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x4000>>14) != 0 { + _sqlite3SrcItemColumnUsed(tls, pItem, j) + } } if 0 == cnt && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_NoVisibleRowid) == uint32(0) { /* pTab is a potential ROWID match. Keep track of it and match @@ -80150,11 +80319,11 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh pTab = (*TParse)(unsafe.Pointer(pParse)).FpTriggerTab } } else { - if op != int32(TK_DELETE) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6720, zTab) == 0 { + if op != int32(TK_DELETE) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6745, zTab) == 0 { (*TExpr)(unsafe.Pointer(pExpr)).FiTable = int32(1) pTab = (*TParse)(unsafe.Pointer(pParse)).FpTriggerTab } else { - if op != int32(TK_INSERT) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6724, zTab) == 0 { + if op != int32(TK_INSERT) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6749, zTab) == 0 { (*TExpr)(unsafe.Pointer(pExpr)).FiTable = 0 pTab = (*TParse)(unsafe.Pointer(pParse)).FpTriggerTab } @@ -80163,36 +80332,25 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh } if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_UUpsert) != 0 && zTab != uintptr(0) { pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) - if pUpsert != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6728, zTab) == 0 { + if pUpsert != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6753, zTab) == 0 { pTab = (*(*TSrcItem)(unsafe.Pointer((*TUpsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8))).FpSTab (*TExpr)(unsafe.Pointer(pExpr)).FiTable = int32(EXCLUDED_TABLE_NUMBER) } } if pTab != 0 { - hCol1 = _sqlite3StrIHash(tls, zCol) pSchema = (*TTable)(unsafe.Pointer(pTab)).FpSchema cntTab++ - iCol = 0 - pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol - for { - if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break + iCol = _sqlite3ColumnIndex(tls, pTab, zCol) + if iCol >= 0 { + if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) == iCol { + iCol = -int32(1) } - if libc.Int32FromUint8((*TColumn)(unsafe.Pointer(pCol)).FhName) == libc.Int32FromUint8(hCol1) && _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 { - if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { - iCol = -int32(1) - } - break + } else { + if _sqlite3IsRowid(tls, zCol) != 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_NoVisibleRowid) == uint32(0) { + iCol = -int32(1) + } else { + iCol = int32((*TTable)(unsafe.Pointer(pTab)).FnCol) } - goto _6 - _6: - ; - iCol++ - pCol += 16 - } - if iCol >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) && _sqlite3IsRowid(tls, zCol) != 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_NoVisibleRowid) == uint32(0) { - /* IMP: R-51414-32910 */ - iCol = -int32(1) } if iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { cnt++ @@ -80221,18 +80379,18 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh } else { if (*TExpr)(unsafe.Pointer(pExpr)).FiTable == 0 { if iCol >= int32(32) { - v7 = uint32(0xffffffff) + v5 = uint32(0xffffffff) } else { - v7 = libc.Uint32FromInt32(1) << iCol + v5 = libc.Uint32FromInt32(1) << iCol } - *(*Tu32)(unsafe.Pointer(pParse + 216)) |= v7 + *(*Tu32)(unsafe.Pointer(pParse + 248)) |= v5 } else { if iCol >= int32(32) { - v8 = uint32(0xffffffff) + v6 = uint32(0xffffffff) } else { - v8 = libc.Uint32FromInt32(1) << iCol + v6 = libc.Uint32FromInt32(1) << iCol } - *(*Tu32)(unsafe.Pointer(pParse + 220)) |= v8 + *(*Tu32)(unsafe.Pointer(pParse + 252)) |= v6 } } } @@ -80279,15 +80437,15 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh if int32(uint32(*(*uint16)(unsafe.Pointer(pEList + 8 + uintptr(j)*32 + 16 + 4))&0x3>>0)) == ENAME_NAME && Xsqlite3_stricmp(tls, zAs, zCol) == 0 { pOrig = (*(*TExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*32))).FpExpr if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowAgg) == 0 && (*TExpr)(unsafe.Pointer(pOrig)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Agg)) != uint32(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6737, libc.VaList(bp+24, zAs)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6762, libc.VaList(bp+24, zAs)) return int32(WRC_Abort) } if (*TExpr)(unsafe.Pointer(pOrig)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Win)) != uint32(0) && ((*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowWin) == 0 || pNC != pTopNC) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6768, libc.VaList(bp+24, zAs)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6793, libc.VaList(bp+24, zAs)) return int32(WRC_Abort) } if _sqlite3ExprVectorSize(tls, pOrig) != int32(1) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6805, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6830, 0) return int32(WRC_Abort) } _resolveAlias(tls, pParse, pEList, j, pExpr, nSubquery) @@ -80298,8 +80456,8 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh } goto lookupname_end } - goto _9 - _9: + goto _7 + _7: ; j++ } @@ -80339,7 +80497,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh ** a huge amount of legacy SQL that uses it. So for now, we just ** issue a warning. */ - Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+6823, libc.VaList(bp+24, zCol)) + Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+6848, libc.VaList(bp+24, zCol)) (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_STRING) libc.Xmemset(tls, pExpr+64, 0, uint64(8)) return int32(WRC_Prune) @@ -80359,7 +80517,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh if *(*uintptr)(unsafe.Pointer(bp)) != 0 { if (*TExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnExpr == cnt-int32(1) { if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Leaf)) != uint32(0) { - *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Leaf)) + *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Leaf)) } else { _sqlite3ExprDelete(tls, db, (*TExpr)(unsafe.Pointer(pExpr)).FpLeft) (*TExpr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0) @@ -80368,7 +80526,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh } _extendFJMatch(tls, pParse, bp, pMatch, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn) (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_FUNCTION) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 6858 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 6883 *(*uintptr)(unsafe.Pointer(pExpr + 32)) = *(*uintptr)(unsafe.Pointer(bp)) cnt = int32(1) goto lookupname_end @@ -80378,26 +80536,26 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh } } if cnt == 0 { - v10 = __ccgo_ts + 6867 + v8 = __ccgo_ts + 6892 } else { - v10 = __ccgo_ts + 6882 + v8 = __ccgo_ts + 6907 } - zErr = v10 + zErr = v8 if zDb != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6904, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6929, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) } else { if zTab != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6917, libc.VaList(bp+24, zErr, zTab, zCol)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6942, libc.VaList(bp+24, zErr, zTab, zCol)) } else { if cnt == 0 && (*TExpr)(unsafe.Pointer(pRight)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_DblQuoted)) != uint32(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6927, libc.VaList(bp+24, zErr, zCol)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6952, libc.VaList(bp+24, zErr, zCol)) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6988, libc.VaList(bp+24, zErr, zCol)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7013, libc.VaList(bp+24, zErr, zCol)) } } } _sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr) - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) (*TNameContext)(unsafe.Pointer(pTopNC)).FnNcErr++ eNewExprOp = int32(TK_NULL) } @@ -80446,8 +80604,8 @@ lookupname_end: break } pTopNC = (*TNameContext)(unsafe.Pointer(pTopNC)).FpNext - goto _11 - _11: + goto _9 + _9: } return int32(WRC_Prune) } else { @@ -80521,19 +80679,19 @@ func _notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pEx defer tls.Free(32) var zIn uintptr _ = zIn - zIn = __ccgo_ts + 6995 + zIn = __ccgo_ts + 7020 if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_IdxExpr) != 0 { - zIn = __ccgo_ts + 7023 + zIn = __ccgo_ts + 7048 } else { if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_IsCheck) != 0 { - zIn = __ccgo_ts + 7041 + zIn = __ccgo_ts + 7066 } else { if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_GenCol) != 0 { - zIn = __ccgo_ts + 7059 + zIn = __ccgo_ts + 7084 } } } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7077, libc.VaList(bp+8, zMsg, zIn)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7102, libc.VaList(bp+8, zMsg, zIn)) if pExpr != 0 { (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_NULL) } @@ -80705,7 +80863,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { } else { pLeft = (*TExpr)(unsafe.Pointer(pExpr)).FpLeft if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&(libc.Int32FromInt32(NC_IdxExpr)|libc.Int32FromInt32(NC_GenCol)) != 0 { - _notValidImpl(tls, pParse, pNC, __ccgo_ts+7097, uintptr(0), pExpr) + _notValidImpl(tls, pParse, pNC, __ccgo_ts+7122, uintptr(0), pExpr) } pRight = (*TExpr)(unsafe.Pointer(pExpr)).FpRight if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pRight)).Fop) == int32(TK_ID) { @@ -80760,7 +80918,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { if n == int32(2) { (*TExpr)(unsafe.Pointer(pExpr)).FiTable = _exprProbability(tls, (*(*TExprList_item)(unsafe.Pointer(pList + 8 + 1*32))).FpExpr) if (*TExpr)(unsafe.Pointer(pExpr)).FiTable < 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7114, libc.VaList(bp+8, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7139, libc.VaList(bp+8, pExpr)) (*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -80784,7 +80942,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { auth = _sqlite3AuthCheck(tls, pParse, int32(SQLITE_FUNCTION), uintptr(0), (*TFuncDef)(unsafe.Pointer(pDef)).FzName, uintptr(0)) if auth != SQLITE_OK { if auth == int32(SQLITE_DENY) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7178, libc.VaList(bp+8, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7203, libc.VaList(bp+8, pExpr)) (*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++ } (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_NULL) @@ -80798,13 +80956,13 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { ** an EP_SubtArg expression. In this case subtypes are required as ** the function may return a value with a subtype back to its ** caller using sqlite3_result_value(). */ - if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_SUBTYPE) != 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_SubtArg) != uint32(0) { + if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_SUBTYPE) != 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromUint32(EP_SubtArg) != uint32(0) { ii = 0 for { if !(ii < n) { break } - *(*Tu32)(unsafe.Pointer((*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ii)*32))).FpExpr + 4)) |= uint32(EP_SubtArg) + *(*Tu32)(unsafe.Pointer((*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ii)*32))).FpExpr + 4)) |= libc.Uint32FromUint32(EP_SubtArg) goto _7 _7: ; @@ -80824,16 +80982,13 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { ** sqlite_version() that might change over time cannot be used ** in an index or generated column. Curiously, they can be used ** in a CHECK constraint. SQLServer, MySQL, and PostgreSQL all - ** all this. */ + ** allow this. */ if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&(libc.Int32FromInt32(NC_IdxExpr)|libc.Int32FromInt32(NC_PartIdx)|libc.Int32FromInt32(NC_GenCol)) != 0 { - _notValidImpl(tls, pParse, pNC, __ccgo_ts+7214, uintptr(0), pExpr) + _notValidImpl(tls, pParse, pNC, __ccgo_ts+7239, uintptr(0), pExpr) } } else { /* Must fit in 8 bits */ (*TExpr)(unsafe.Pointer(pExpr)).Fop2 = libc.Uint8FromInt32((*TNameContext)(unsafe.Pointer(pNC)).FncFlags & int32(NC_SelfRef)) - if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_FromDDL) != 0 { - *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_FromDDL)) - } } if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_INTERNAL) != uint32(0) && libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FmDbFlags&uint32(DBFLAG_InternalFunc) == uint32(0) { /* Internal-use-only functions are disallowed unless the @@ -80844,35 +80999,38 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { pDef = uintptr(0) } else { if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_DIRECT)|libc.Int32FromInt32(SQLITE_FUNC_UNSAFE)) != uint32(0) && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) { + if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_FromDDL) != 0 { + *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_FromDDL)) + } _sqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef) } } } if 0 == libc.BoolInt32(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= int32(PARSE_MODE_RENAME)) { if pDef != 0 && (*TFuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0) && pWin != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7242, libc.VaList(bp+8, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7267, libc.VaList(bp+8, pExpr)) (*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else { if is_agg != 0 && (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowAgg) == 0 || is_agg != 0 && (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_WINDOW) != 0 && !(pWin != 0) || is_agg != 0 && pWin != 0 && (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowWin) == 0 { if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_WINDOW) != 0 || pWin != 0 { - zType = __ccgo_ts + 7285 + zType = __ccgo_ts + 7310 } else { - zType = __ccgo_ts + 7292 + zType = __ccgo_ts + 7317 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7302, libc.VaList(bp+8, zType, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7327, libc.VaList(bp+8, zType, pExpr)) (*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++ is_agg = 0 } else { if no_such_func != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7330, libc.VaList(bp+8, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7355, libc.VaList(bp+8, pExpr)) (*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else { if wrong_num_args != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7352, libc.VaList(bp+8, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7377, libc.VaList(bp+8, pExpr)) (*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else { if is_agg == 0 && (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc)) != uint32(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7396, libc.VaList(bp+8, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7421, libc.VaList(bp+8, pExpr)) (*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else { if is_agg == 0 && (*TExpr)(unsafe.Pointer(pExpr)).FpLeft != 0 { @@ -80957,7 +81115,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_xIsSelect) != uint32(0) { nRef = (*TNameContext)(unsafe.Pointer(pNC)).FnRef if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_SelfRef) != 0 { - _notValidImpl(tls, pParse, pNC, __ccgo_ts+7444, pExpr, pExpr) + _notValidImpl(tls, pParse, pNC, __ccgo_ts+7469, pExpr, pExpr) } else { _sqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } @@ -80969,7 +81127,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { } case int32(TK_VARIABLE): if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&(libc.Int32FromInt32(NC_IsCheck)|libc.Int32FromInt32(NC_PartIdx)|libc.Int32FromInt32(NC_IdxExpr)|libc.Int32FromInt32(NC_GenCol)) != 0 { - _notValidImpl(tls, pParse, pNC, __ccgo_ts+7455, pExpr, pExpr) + _notValidImpl(tls, pParse, pNC, __ccgo_ts+7480, pExpr, pExpr) } case int32(TK_IS): fallthrough @@ -81015,7 +81173,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { nRight = _sqlite3ExprVectorSize(tls, (*TExpr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6805, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6830, 0) _sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break @@ -81140,7 +81298,7 @@ func _resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintpt func _resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { bp := tls.Alloc(32) defer tls.Free(32) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7466, libc.VaList(bp+8, i, zType, mx)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7491, libc.VaList(bp+8, i, zType, mx)) _sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pError) } @@ -81175,7 +81333,7 @@ func _resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) (r } db = (*TParse)(unsafe.Pointer(pParse)).Fdb if (*TExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7522, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7547, 0) return int32(1) } i = 0 @@ -81213,7 +81371,7 @@ func _resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) (r } if _sqlite3ExprIsInteger(tls, pE, bp, uintptr(0)) != 0 { if *(*int32)(unsafe.Pointer(bp)) <= 0 || *(*int32)(unsafe.Pointer(bp)) > (*TExprList)(unsafe.Pointer(pEList)).FnExpr { - _resolveOutOfRangeError(tls, pParse, __ccgo_ts+7556, i+int32(1), (*TExprList)(unsafe.Pointer(pEList)).FnExpr, pE) + _resolveOutOfRangeError(tls, pParse, __ccgo_ts+7581, i+int32(1), (*TExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return int32(1) } } else { @@ -81283,7 +81441,7 @@ func _resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) (r break } if int32(uint32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 16 + 4))&0x4>>2)) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7562, libc.VaList(bp+16, i+int32(1))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7587, libc.VaList(bp+16, i+int32(1))) return int32(1) } goto _3 @@ -81317,7 +81475,7 @@ func _sqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*TExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7623, libc.VaList(bp+8, zType)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7648, libc.VaList(bp+8, zType)) return int32(1) } pEList = (*TSelect)(unsafe.Pointer(pSelect)).FpEList @@ -81630,7 +81788,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { (*(*TNameContext)(unsafe.Pointer(bp))).FncFlags |= int32(NC_UEList) if (*TSelect)(unsafe.Pointer(p)).FpHaving != 0 { if (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Aggregate) == uint32(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7654, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7679, 0) return int32(WRC_Abort) } if _sqlite3ResolveExprNames(tls, bp, (*TSelect)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -81697,7 +81855,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { ** is not detected until much later, and so we need to go ahead and ** resolve those symbols on the incorrect ORDER BY for consistency. */ - if (*TSelect)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && _resolveOrderGroupBy(tls, bp, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7556) != 0 { + if (*TSelect)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && _resolveOrderGroupBy(tls, bp, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7581) != 0 { return int32(WRC_Abort) } if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -81708,7 +81866,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { ** the GROUP BY clause does not contain aggregate functions. */ if pGroupBy != 0 { - if _resolveOrderGroupBy(tls, bp, p, pGroupBy, __ccgo_ts+7693) != 0 || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if _resolveOrderGroupBy(tls, bp, p, pGroupBy, __ccgo_ts+7718) != 0 || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return int32(WRC_Abort) } i = 0 @@ -81718,7 +81876,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { break } if (*TExpr)(unsafe.Pointer((*TExprList_item)(unsafe.Pointer(pItem2)).FpExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Agg)) != uint32(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7699, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7724, 0) return int32(WRC_Abort) } goto _6 @@ -81940,33 +82098,35 @@ func _sqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter func _sqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) (r int32) { bp := tls.Alloc(144) defer tls.Free(144) + var pSrc uintptr var rc, v1 int32 - var _ /* sNC at bp+88 */ TNameContext - var _ /* sSrc at bp+0 */ TSrcList - _, _ = rc, v1 - libc.Xmemset(tls, bp+88, 0, uint64(56)) - libc.Xmemset(tls, bp, 0, uint64(88)) + var _ /* sNC at bp+0 */ TNameContext + var _ /* srcSpace at bp+56 */ [88]Tu8 + _, _, _ = pSrc, rc, v1 /* Memory space for the fake SrcList */ + libc.Xmemset(tls, bp, 0, uint64(56)) + pSrc = bp + 56 + libc.Xmemset(tls, pSrc, 0, uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt64(80)) if pTab != 0 { - (*(*TSrcList)(unsafe.Pointer(bp))).FnSrc = int32(1) - (*(*TSrcItem)(unsafe.Pointer(bp + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName - (*(*TSrcItem)(unsafe.Pointer(bp + 8))).FpSTab = pTab - (*(*TSrcItem)(unsafe.Pointer(bp + 8))).FiCursor = -int32(1) + (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc = int32(1) + (*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName + (*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).FpSTab = pTab + (*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).FiCursor = -int32(1) if (*TTable)(unsafe.Pointer(pTab)).FpSchema != (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FaDb + 1*32))).FpSchema { /* Cause EP_FromDDL to be set on TK_FUNCTION nodes of non-TEMP ** schema elements */ type1 |= int32(NC_FromDDL) } } - (*(*TNameContext)(unsafe.Pointer(bp + 88))).FpParse = pParse - (*(*TNameContext)(unsafe.Pointer(bp + 88))).FpSrcList = bp - (*(*TNameContext)(unsafe.Pointer(bp + 88))).FncFlags = type1 | int32(NC_IsDDL) - v1 = _sqlite3ResolveExprNames(tls, bp+88, pExpr) + (*(*TNameContext)(unsafe.Pointer(bp))).FpParse = pParse + (*(*TNameContext)(unsafe.Pointer(bp))).FpSrcList = pSrc + (*(*TNameContext)(unsafe.Pointer(bp))).FncFlags = type1 | int32(NC_IsDDL) + v1 = _sqlite3ResolveExprNames(tls, bp, pExpr) rc = v1 if v1 != SQLITE_OK { return rc } if pList != 0 { - rc = _sqlite3ResolveExprListNames(tls, bp+88, pList) + rc = _sqlite3ResolveExprListNames(tls, bp, pList) } return rc } @@ -82018,7 +82178,7 @@ func _sqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) (r int8) { if op == int32(TK_SELECT_COLUMN) { return _sqlite3ExprAffinity(tls, (*(*TExprList_item)(unsafe.Pointer((*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TExpr)(unsafe.Pointer(pExpr)).FpLeft + 32)))).FpEList + 8 + uintptr((*TExpr)(unsafe.Pointer(pExpr)).FiColumn)*32))).FpExpr) } - if op == int32(TK_VECTOR) { + if op == int32(TK_VECTOR) || op == int32(TK_FUNCTION) && int32((*TExpr)(unsafe.Pointer(pExpr)).FaffExpr) == int32(SQLITE_AFF_DEFER) { return _sqlite3ExprAffinity(tls, (*(*TExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8))).FpExpr) } if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip)|libc.Int32FromInt32(EP_IfNullRow)) != uint32(0) { @@ -82226,7 +82386,7 @@ func _sqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r uintpt p = (*TExpr)(unsafe.Pointer(p)).FpLeft continue } - if op == int32(TK_VECTOR) { + if op == int32(TK_VECTOR) || op == int32(TK_FUNCTION) && int32((*TExpr)(unsafe.Pointer(p)).FaffExpr) == int32(SQLITE_AFF_DEFER) { p = (*(*TExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32)) + 8))).FpExpr continue } @@ -82701,7 +82861,7 @@ func _codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32 return } if nLeft != _sqlite3ExprVectorSize(tls, pRight) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6805, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6830, 0) return } if libc.Int32FromUint8(op) == int32(TK_LE) { @@ -82780,7 +82940,7 @@ func _sqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) (r in rc = SQLITE_OK mxHeight = *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7758, libc.VaList(bp+8, mxHeight)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7783, libc.VaList(bp+8, mxHeight)) rc = int32(SQLITE_ERROR) } return rc @@ -83125,11 +83285,11 @@ func _sqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList } if nExprElem != nElem { if nExprElem > int32(1) { - v2 = __ccgo_ts + 7806 + v2 = __ccgo_ts + 7831 } else { v2 = __ccgo_ts + 1665 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7808, libc.VaList(bp+8, nExprElem, v2, nElem)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7833, libc.VaList(bp+8, nExprElem, v2, nElem)) break } pSel = _sqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 32)), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(SF_Values), uintptr(0)) @@ -83178,7 +83338,7 @@ func _sqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt if f&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_InnerON)|libc.Int32FromInt32(EP_IsFalse)) == uint32(EP_IsFalse) && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) { _sqlite3ExprDeferredDelete(tls, pParse, pLeft) _sqlite3ExprDeferredDelete(tls, pParse, pRight) - return _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1785) + return _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1811) } else { return _sqlite3PExpr(tls, pParse, int32(TK_AND), pLeft, pRight) } @@ -83206,7 +83366,7 @@ func _sqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } *(*int32)(unsafe.Pointer(pNew + 52)) = int32(int64((*TToken)(unsafe.Pointer(pToken)).Fz) - int64((*TParse)(unsafe.Pointer(pParse)).FzTail)) if pList != 0 && (*TExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 136 + 6*4)) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7852, libc.VaList(bp+8, pToken)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7877, libc.VaList(bp+8, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*Tu32)(unsafe.Pointer(pNew + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_HasFunc)) @@ -83226,7 +83386,7 @@ func _sqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u func _sqlite3ExprOrderByAggregateError(tls *libc.TLS, pParse uintptr, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7886, libc.VaList(bp+8, p)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7911, libc.VaList(bp+8, p)) } // C documentation @@ -83297,7 +83457,7 @@ func _sqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD ** SQLITE_DBCONFIG_TRUSTED_SCHEMA is off (meaning ** that the schema is possibly tainted). */ - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7936, libc.VaList(bp+8, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7961, libc.VaList(bp+8, pExpr)) } } } @@ -83349,7 +83509,7 @@ func _sqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n bOk = libc.BoolInt32(0 == _sqlite3Atoi64(tls, z+1, bp, libc.Int32FromUint32(n-uint32(1)), uint8(SQLITE_UTF8))) } if bOk == 0 || *(*Ti64)(unsafe.Pointer(bp)) < int64(1) || *(*Ti64)(unsafe.Pointer(bp)) > int64(*(*int32)(unsafe.Pointer(db + 136 + 9*4))) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7956, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7981, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) _sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr) return } @@ -83382,7 +83542,7 @@ func _sqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*TExpr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7999, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8024, 0) _sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } @@ -83765,7 +83925,7 @@ func _sqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { _, _, _ = i, nByte, pRet pRet = uintptr(0) if p != 0 { - nByte = libc.Int64FromUint64(uint64(64) + uint64(48)*libc.Uint64FromInt32((*TWith)(unsafe.Pointer(p)).FnCte-libc.Int32FromInt32(1))) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+16) + libc.Uint64FromInt32((*TWith)(unsafe.Pointer(p)).FnCte)*libc.Uint64FromInt64(48)) pRet = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte)) if pRet != 0 { (*TWith)(unsafe.Pointer(pRet)).FnCte = (*TWith)(unsafe.Pointer(p)).FnCte @@ -83905,7 +84065,6 @@ func _sqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r u } (*TExprList_item)(unsafe.Pointer(pItem)).FzEName = _sqlite3DbStrDup(tls, db, (*TExprList_item)(unsafe.Pointer(pOldItem)).FzEName) (*TExprList_item)(unsafe.Pointer(pItem)).Ffg = (*TExprList_item)(unsafe.Pointer(pOldItem)).Ffg - libc.SetBitFieldPtr16Uint32(pItem+16+4, libc.Uint32FromInt32(0), 2, 0x4) (*TExprList_item)(unsafe.Pointer(pItem)).Fu = (*TExprList_item)(unsafe.Pointer(pOldItem)).Fu goto _1 _1: @@ -83926,27 +84085,20 @@ func _sqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r u // ** called with a NULL argument. // */ func _sqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r uintptr) { - var i, nByte int32 - var pNew, pNewItem, pNewSubq, pOldItem, pTab, v4 uintptr - var v1 uint64 - var v2 Tu32 - _, _, _, _, _, _, _, _, _, _ = i, nByte, pNew, pNewItem, pNewSubq, pOldItem, pTab, v1, v2, v4 + var i int32 + var pNew, pNewItem, pNewSubq, pOldItem, pTab, v3 uintptr + var v1 Tu32 + _, _, _, _, _, _, _, _ = i, pNew, pNewItem, pNewSubq, pOldItem, pTab, v1, v3 if p == uintptr(0) { return uintptr(0) } - if (*TSrcList)(unsafe.Pointer(p)).FnSrc > 0 { - v1 = uint64(80) * libc.Uint64FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc-libc.Int32FromInt32(1)) - } else { - v1 = uint64(0) - } - nByte = libc.Int32FromUint64(uint64(88) + v1) - pNew = _sqlite3DbMallocRawNN(tls, db, libc.Uint64FromInt32(nByte)) + pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc)*libc.Uint64FromInt64(80))) if pNew == uintptr(0) { return uintptr(0) } - v2 = libc.Uint32FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc) - (*TSrcList)(unsafe.Pointer(pNew)).FnAlloc = v2 - (*TSrcList)(unsafe.Pointer(pNew)).FnSrc = libc.Int32FromUint32(v2) + v1 = libc.Uint32FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc) + (*TSrcList)(unsafe.Pointer(pNew)).FnAlloc = v1 + (*TSrcList)(unsafe.Pointer(pNew)).FnSrc = libc.Int32FromUint32(v1) i = 0 for { if !(i < (*TSrcList)(unsafe.Pointer(p)).FnSrc) { @@ -83992,9 +84144,9 @@ func _sqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r ui if int32(*(*uint32)(unsafe.Pointer(pNewItem + 24 + 4))&0x200>>9) != 0 { (*TCteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNewItem + 56)))).FnUse++ } - v4 = (*TSrcItem)(unsafe.Pointer(pOldItem)).FpSTab - (*TSrcItem)(unsafe.Pointer(pNewItem)).FpSTab = v4 - pTab = v4 + v3 = (*TSrcItem)(unsafe.Pointer(pOldItem)).FpSTab + (*TSrcItem)(unsafe.Pointer(pNewItem)).FpSTab = v3 + pTab = v3 if pTab != 0 { (*TTable)(unsafe.Pointer(pTab)).FnTabRef++ } @@ -84004,8 +84156,8 @@ func _sqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r ui *(*uintptr)(unsafe.Pointer(pNewItem + 64)) = _sqlite3ExprDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 64)), flags) } (*TSrcItem)(unsafe.Pointer(pNewItem)).FcolUsed = (*TSrcItem)(unsafe.Pointer(pOldItem)).FcolUsed - goto _3 - _3: + goto _2 + _2: ; i++ } @@ -84019,7 +84171,7 @@ func _sqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { if p == uintptr(0) { return uintptr(0) } - pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(16)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(p)).FnId-libc.Int32FromInt32(1))*uint64(8))) + pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(p)).FnId)*libc.Uint64FromInt64(8))) if pNew == uintptr(0) { return uintptr(0) } @@ -84070,7 +84222,7 @@ func _sqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) (r (*TSelect)(unsafe.Pointer(pNew)).FpLimit = _sqlite3ExprDup(tls, db, (*TSelect)(unsafe.Pointer(p)).FpLimit, flags) (*TSelect)(unsafe.Pointer(pNew)).FiLimit = 0 (*TSelect)(unsafe.Pointer(pNew)).FiOffset = 0 - (*TSelect)(unsafe.Pointer(pNew)).FselFlags = (*TSelect)(unsafe.Pointer(p)).FselFlags & libc.Uint32FromInt32(^libc.Int32FromInt32(SF_UsesEphemeral)) + (*TSelect)(unsafe.Pointer(pNew)).FselFlags = (*TSelect)(unsafe.Pointer(p)).FselFlags & ^libc.Uint32FromInt32(SF_UsesEphemeral) *(*int32)(unsafe.Pointer(pNew + 20)) = -int32(1) *(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -int32(1) (*TSelect)(unsafe.Pointer(pNew)).FnSelectRow = (*TSelect)(unsafe.Pointer(p)).FnSelectRow @@ -84151,7 +84303,7 @@ var _zeroItem = TExprList_item{} func _sqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) (r uintptr) { var pItem, pList uintptr _, _ = pItem, pList - pList = _sqlite3DbMallocRawNN(tls, db, uint64(libc.Uint64FromInt64(40)+libc.Uint64FromInt64(32)*libc.Uint64FromInt32(4))) + pList = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32(libc.Int32FromInt32(4))*libc.Uint64FromInt64(32))) if pList == uintptr(0) { _sqlite3ExprDelete(tls, db, pExpr) return uintptr(0) @@ -84169,7 +84321,7 @@ func _sqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr var v1 int32 _, _, _, _ = pItem, pNew, v1, v2 *(*int32)(unsafe.Pointer(pList + 4)) *= int32(2) - pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint64(40)+libc.Uint64FromInt32((*TExprList)(unsafe.Pointer(pList)).FnAlloc-libc.Int32FromInt32(1))*uint64(32))) + pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32((*TExprList)(unsafe.Pointer(pList)).FnAlloc)*libc.Uint64FromInt64(32))) if pNew == uintptr(0) { _sqlite3ExprListDelete(tls, db, pList) _sqlite3ExprDelete(tls, db, pExpr) @@ -84250,7 +84402,7 @@ func _sqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, n = v2 } if v3 && (*TIdList)(unsafe.Pointer(pColumns)).FnId != v2 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8022, libc.VaList(bp+8, (*TIdList)(unsafe.Pointer(pColumns)).FnId, n)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8047, libc.VaList(bp+8, (*TIdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error } i = 0 @@ -84379,7 +84531,7 @@ func _sqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, _ = mx mx = *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 136 + 2*4)) if pEList != 0 && (*TExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8052, libc.VaList(bp+8, zObject)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8077, libc.VaList(bp+8, zObject)) } } @@ -84477,10 +84629,10 @@ func _sqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) (r // ** anything else 0 // */ func _sqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) (r Tu32) { - if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8075) == 0 { + if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8100) == 0 { return uint32(EP_IsTrue) } - if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8080) == 0 { + if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8105) == 0 { return uint32(EP_IsFalse) } return uint32(0) @@ -85158,13 +85310,13 @@ func _sqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) (r in // ** Return TRUE if the given string is a row-id column name. // */ func _sqlite3IsRowid(tls *libc.TLS, z uintptr) (r int32) { - if _sqlite3StrICmp(tls, z, __ccgo_ts+8086) == 0 { + if _sqlite3StrICmp(tls, z, __ccgo_ts+8111) == 0 { return int32(1) } - if _sqlite3StrICmp(tls, z, __ccgo_ts+8094) == 0 { + if _sqlite3StrICmp(tls, z, __ccgo_ts+8119) == 0 { return int32(1) } - if _sqlite3StrICmp(tls, z, __ccgo_ts+8100) == 0 { + if _sqlite3StrICmp(tls, z, __ccgo_ts+8125) == 0 { return int32(1) } return 0 @@ -85179,32 +85331,19 @@ func _sqlite3IsRowid(tls *libc.TLS, z uintptr) (r int32) { // */ func _sqlite3RowidAlias(tls *libc.TLS, pTab uintptr) (r uintptr) { var azOpt [3]uintptr - var iCol, ii int32 - _, _, _ = azOpt, iCol, ii + var ii int32 + _, _ = azOpt, ii azOpt = [3]uintptr{ - 0: __ccgo_ts + 8086, - 1: __ccgo_ts + 8094, - 2: __ccgo_ts + 8100, + 0: __ccgo_ts + 8111, + 1: __ccgo_ts + 8119, + 2: __ccgo_ts + 8125, } ii = 0 for { if !(ii < libc.Int32FromUint64(libc.Uint64FromInt64(24)/libc.Uint64FromInt64(8))) { break } - iCol = 0 - for { - if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } - if Xsqlite3_stricmp(tls, azOpt[ii], (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName) == 0 { - break - } - goto _2 - _2: - ; - iCol++ - } - if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { + if _sqlite3ColumnIndex(tls, pTab, azOpt[ii]) < 0 { return azOpt[ii] } goto _1 @@ -85413,7 +85552,7 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32 eType = 0 /* True if RHS must be unique */ v = _sqlite3GetVdbe(tls, pParse) /* Virtual machine being coded */ mustBeUnique = libc.BoolInt32(inFlags&uint32(IN_INDEX_LOOP) != uint32(0)) - v2 = pParse + 56 + v2 = pParse + 60 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ iTab = v1 @@ -85466,7 +85605,7 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32 iAddr = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once)) _sqlite3OpenTable(tls, pParse, iTab, iDb, pTab, int32(OP_OpenRead)) eType = int32(IN_INDEX_ROWID) - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8104, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8129, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) _sqlite3VdbeJumpHere(tls, v, iAddr) } else { /* Iterator variable */ affinity_ok = int32(1) @@ -85566,12 +85705,12 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32 if colUsed == libc.Uint64FromInt32(1)<<nExpr-uint64(1) { /* If we reach this point, that means the index pIdx is usable */ iAddr1 = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once)) - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8151, libc.VaList(bp+8, (*TIndex)(unsafe.Pointer(pIdx)).FzName)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8176, libc.VaList(bp+8, (*TIndex)(unsafe.Pointer(pIdx)).FzName)) _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenRead), iTab, libc.Int32FromUint32((*TIndex)(unsafe.Pointer(pIdx)).Ftnum), iDb) _sqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) eType = int32(IN_INDEX_INDEX_ASC) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder))) if prRhsHasNull != 0 { - v11 = pParse + 60 + v11 = pParse + 64 *(*int32)(unsafe.Pointer(v11))++ v10 = *(*int32)(unsafe.Pointer(v11)) *(*int32)(unsafe.Pointer(prRhsHasNull)) = v10 @@ -85612,7 +85751,7 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32 (*TParse)(unsafe.Pointer(pParse)).FnQueryLoop = 0 } else { if prRhsHasNull != 0 { - v14 = pParse + 60 + v14 = pParse + 64 *(*int32)(unsafe.Pointer(v14))++ v13 = *(*int32)(unsafe.Pointer(v14)) v12 = v13 @@ -85667,7 +85806,7 @@ func _exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r uintptr) { v1 = uintptr(0) } pSelect = v1 - zRet = _sqlite3DbMallocRaw(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt32(nVal+int32(1))) + zRet = _sqlite3DbMallocRaw(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt64(int64(1)+int64(nVal))) if zRet != 0 { i = 0 for { @@ -85705,7 +85844,7 @@ func _sqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec var zFmt uintptr _ = zFmt if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 { - zFmt = __ccgo_ts + 8182 + zFmt = __ccgo_ts + 8207 _sqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp+8, nActual, nExpect)) } } @@ -85727,7 +85866,7 @@ func _sqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_xIsSelect) != uint32(0) { _sqlite3SubselectError(tls, pParse, (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, int32(1)) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6805, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6830, 0) } } @@ -85852,7 +85991,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn)) != uint32(0) || _findCompatibleInRhsSubrtn(tls, pParse, pExpr, pSig) != 0 { addrOnce = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once)) if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_xIsSelect) != uint32(0) { - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8226, libc.VaList(bp+56, (*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8251, libc.VaList(bp+56, (*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) } _sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), (*(*struct { FiAddr int32 @@ -85871,7 +86010,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 } /* Begin coding the subroutine */ *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn)) - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) (*(*struct { @@ -85921,9 +86060,9 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 if addrOnce != 0 { v3 = __ccgo_ts + 1665 } else { - v3 = __ccgo_ts + 8249 + v3 = __ccgo_ts + 8274 } - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8261, libc.VaList(bp+56, v3, (*TSelect)(unsafe.Pointer(pSelect)).FselId)) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8286, libc.VaList(bp+56, v3, (*TSelect)(unsafe.Pointer(pSelect)).FselId)) /* If the LHS and RHS of the IN operator do not match, that ** error will have been caught long before we reach this point. */ if (*TExprList)(unsafe.Pointer(pEList)).FnExpr == nVal { @@ -85932,7 +86071,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 (*(*TSelectDest)(unsafe.Pointer(bp))).FzAffSdst = _exprINAffinity(tls, pParse, pExpr) (*TSelect)(unsafe.Pointer(pSelect)).FiLimit = 0 if addrOnce != 0 && (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_BloomFilter)) == uint32(0) { - v5 = pParse + 60 + v5 = pParse + 64 *(*int32)(unsafe.Pointer(v5))++ v4 = *(*int32)(unsafe.Pointer(v5)) regBloom = v4 @@ -85950,11 +86089,12 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 _sqlite3SelectDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pCopy) _sqlite3DbFree(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*(*TSelectDest)(unsafe.Pointer(bp))).FzAffSdst) if addrBloom != 0 { + /* Remember that location of the Bloom filter in the P3 operand + ** of the OP_Once that began this subroutine. tag-202407032019 */ (*TVdbeOp)(unsafe.Pointer(_sqlite3VdbeGetOp(tls, v, addrOnce))).Fp3 = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm2 if (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm2 == 0 { - _sqlite3VdbeChangeToNoop(tls, v, addrBloom) - } else { - (*TVdbeOp)(unsafe.Pointer(_sqlite3VdbeGetOp(tls, v, addrOnce))).Fp3 = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm2 + /* If the Bloom filter won't actually be used, keep it small */ + (*TVdbeOp)(unsafe.Pointer(_sqlite3VdbeGetOp(tls, v, addrBloom))).Fp1 = int32(10) } } if rc != 0 { @@ -86007,7 +86147,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 if addrOnce != 0 && !(_sqlite3ExprIsConstant(tls, pParse, pE2) != 0) { _sqlite3VdbeChangeToNoop(tls, v, addrOnce-int32(1)) _sqlite3VdbeChangeToNoop(tls, v, addrOnce) - *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Subrtn)) + *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn)) addrOnce = 0 } /* Evaluate the expression and insert it into the temp table */ @@ -86078,7 +86218,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3 /* If this routine has already been coded, then invoke it as a ** subroutine. */ if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn)) != uint32(0) { - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8280, libc.VaList(bp+48, (*TSelect)(unsafe.Pointer(pSel)).FselId)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8305, libc.VaList(bp+48, (*TSelect)(unsafe.Pointer(pSel)).FselId)) _sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), (*(*struct { FiAddr int32 FregReturn int32 @@ -86090,7 +86230,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3 } /* Begin coding the subroutine */ *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn)) - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) (*(*struct { @@ -86130,9 +86270,9 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3 if addrOnce != 0 { v3 = __ccgo_ts + 1665 } else { - v3 = __ccgo_ts + 8249 + v3 = __ccgo_ts + 8274 } - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8298, libc.VaList(bp+48, v3, (*TSelect)(unsafe.Pointer(pSel)).FselId)) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8323, libc.VaList(bp+48, v3, (*TSelect)(unsafe.Pointer(pSel)).FselId)) if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_SELECT) { v4 = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSel)).FpEList)).FnExpr } else { @@ -86140,7 +86280,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3 } nReg = v4 _sqlite3SelectDestInit(tls, bp, 0, (*TParse)(unsafe.Pointer(pParse)).FnMem+int32(1)) - *(*int32)(unsafe.Pointer(pParse + 60)) += nReg + *(*int32)(unsafe.Pointer(pParse + 64)) += nReg if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_SELECT) { (*(*TSelectDest)(unsafe.Pointer(bp))).FeDest = uint8(SRT_Mem) (*(*TSelectDest)(unsafe.Pointer(bp))).FiSdst = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm @@ -86154,7 +86294,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3 /* The subquery already has a limit. If the pre-existing limit is X ** then make the new limit X<>0 so that the new limit is either 1 or 0 */ db = (*TParse)(unsafe.Pointer(pParse)).Fdb - pLimit = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1785) + pLimit = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1811) if pLimit != 0 { (*TExpr)(unsafe.Pointer(pLimit)).FaffExpr = int8(SQLITE_AFF_NUMERIC) pLimit = _sqlite3PExpr(tls, pParse, int32(TK_NE), _sqlite3ExprDup(tls, db, (*TExpr)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSel)).FpLimit)).FpLeft, 0), pLimit) @@ -86163,7 +86303,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3 (*TExpr)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSel)).FpLimit)).FpLeft = pLimit } else { /* If there is no pre-existing limit add a limit of 1 */ - pLimit = _sqlite3Expr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_INTEGER), __ccgo_ts+8319) + pLimit = _sqlite3Expr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_INTEGER), __ccgo_ts+8344) (*TSelect)(unsafe.Pointer(pSel)).FpLimit = _sqlite3PExpr(tls, pParse, int32(TK_LIMIT), pLimit, uintptr(0)) } (*TSelect)(unsafe.Pointer(pSel)).FiLimit = 0 @@ -86259,7 +86399,7 @@ func _sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFals zAff = uintptr(0) /* Where to jump when NULLs seen in step 2 */ destStep6 = 0 /* Top of the step-6 loop */ *(*int32)(unsafe.Pointer(bp + 8)) = 0 /* Index to use */ - okConstFactor = (*TParse)(unsafe.Pointer(pParse)).FokConstFactor + okConstFactor = libc.Uint8FromInt32(int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44)) & 0x4 >> 2))) pLeft = (*TExpr)(unsafe.Pointer(pExpr)).FpLeft if _sqlite3ExprCheckIN(tls, pParse, pExpr) != 0 { return @@ -86294,9 +86434,9 @@ func _sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFals ** Avoid factoring the LHS of the IN(...) expression out of the loop, ** even if it is constant, as OP_Affinity may be used on the register ** by code generated below. */ - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(0), 2, 0x4) rLhsOrig = _exprCodeVector(tls, pParse, pLeft, bp+4) - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor + libc.SetBitFieldPtr8Uint32(pParse+44, uint32(okConstFactor), 2, 0x4) i = 0 for { if !(i < nVector && *(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)) == i) { @@ -86429,7 +86569,7 @@ func _sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFals FiAddr int32 FregReturn int32 })(unsafe.Pointer(pExpr + 64))).FiAddr) - if libc.Int32FromUint8((*TVdbeOp)(unsafe.Pointer(pOp)).Fopcode) == int32(OP_Once) && (*TVdbeOp)(unsafe.Pointer(pOp)).Fp3 > 0 { + if libc.Int32FromUint8((*TVdbeOp)(unsafe.Pointer(pOp)).Fopcode) == int32(OP_Once) && (*TVdbeOp)(unsafe.Pointer(pOp)).Fp3 > 0 { /* tag-202407032019 */ _sqlite3VdbeAddOp4Int(tls, v, int32(OP_Filter), (*TVdbeOp)(unsafe.Pointer(pOp)).Fp3, destIfFalse, rLhs, nVector) } } @@ -86559,13 +86699,13 @@ func _codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, i z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) c = _sqlite3DecOrHexToI64(tls, z, bp) if c == int32(3) && !(negFlag != 0) || c == int32(2) || negFlag != 0 && *(*Ti64)(unsafe.Pointer(bp)) == int64(-libc.Int32FromInt32(1))-(libc.Int64FromUint32(0xffffffff)|libc.Int64FromInt32(0x7fffffff)<<libc.Int32FromInt32(32)) { - if Xsqlite3_strnicmp(tls, z, __ccgo_ts+8321, int32(2)) == 0 { + if Xsqlite3_strnicmp(tls, z, __ccgo_ts+8346, int32(2)) == 0 { if negFlag != 0 { - v1 = __ccgo_ts + 5141 + v1 = __ccgo_ts + 5167 } else { v1 = __ccgo_ts + 1665 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8324, libc.VaList(bp+16, v1, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8349, libc.VaList(bp+16, v1, pExpr)) } else { _codeReal(tls, v, z, negFlag, iMem) } @@ -86653,7 +86793,7 @@ func _sqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(v1)).FcolFlags)&int32(COLFLAG_VIRTUAL) != 0 { pParse = _sqlite3VdbeParser(tls, v) if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_BUSY) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8351, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8376, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) } else { savedSelfTab = (*TParse)(unsafe.Pointer(pParse)).FiSelfTab p2 = pCol + 14 @@ -86667,7 +86807,7 @@ func _sqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT return } else { if !((*TTable)(unsafe.Pointer(pTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) { - x = int32(_sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab), int16(iCol))) + x = _sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab), iCol) op = int32(OP_Column) } else { x = int32(_sqlite3TableColumnToStorage(tls, pTab, int16(iCol))) @@ -86734,7 +86874,7 @@ func _sqlite3ExprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { (*TExpr)(unsafe.Pointer(p)).Fop2 = (*TExpr)(unsafe.Pointer(p)).Fop (*TExpr)(unsafe.Pointer(p)).Fop = uint8(TK_REGISTER) (*TExpr)(unsafe.Pointer(p)).FiTable = iReg - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Skip)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip)) } } @@ -86762,7 +86902,7 @@ func _exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintpt iResult = _sqlite3CodeSubselect(tls, pParse, p) } else { iResult = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nResult + *(*int32)(unsafe.Pointer(pParse + 64)) += nResult i = 0 for { if !(i < nResult) { @@ -86873,16 +87013,16 @@ func _exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFunc ** the SQLite type logic. */ azAff = [6]uintptr{ - 0: __ccgo_ts + 8381, - 1: __ccgo_ts + 8386, - 2: __ccgo_ts + 8391, - 3: __ccgo_ts + 6389, - 4: __ccgo_ts + 6384, - 5: __ccgo_ts + 8399, + 0: __ccgo_ts + 8406, + 1: __ccgo_ts + 8411, + 2: __ccgo_ts + 8416, + 3: __ccgo_ts + 6414, + 4: __ccgo_ts + 6409, + 5: __ccgo_ts + 8424, } aff = _sqlite3ExprAffinity(tls, (*(*TExprList_item)(unsafe.Pointer(pFarg + 8))).FpExpr) if int32(aff) <= int32(SQLITE_AFF_NONE) { - v2 = __ccgo_ts + 8407 + v2 = __ccgo_ts + 8432 } else { v2 = azAff[int32(aff)-int32(SQLITE_AFF_BLOB)] } @@ -86994,7 +87134,7 @@ func _sqlite3IndexedExprLookup(tls *libc.TLS, pParse uintptr, pExpr uintptr, tar ** value taken from an expression index if they are themselves an ** argument to another scalar function or aggregate. ** https://sqlite.org/forum/forumpost/68d284c86b082c3e */ - if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_SubtArg) != uint32(0) && _sqlite3ExprCanReturnSubtype(tls, pParse, pExpr) != 0 { + if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromUint32(EP_SubtArg) != uint32(0) && _sqlite3ExprCanReturnSubtype(tls, pParse, pExpr) != 0 { goto _1 } v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe @@ -87026,7 +87166,7 @@ func _sqlite3IndexedExprLookup(tls *libc.TLS, pParse uintptr, pExpr uintptr, tar // C documentation // // /* -// ** Expresion pExpr is guaranteed to be a TK_COLUMN or equivalent. This +// ** Expression pExpr is guaranteed to be a TK_COLUMN or equivalent. This // ** function checks the Parse.pIdxPartExpr list to see if this column // ** can be replaced with a constant value. If so, it generates code to // ** put the constant value in a register (ideally, but not necessarily, @@ -87172,7 +87312,7 @@ expr_code_doover: iSrc = int32(_sqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*TParse)(unsafe.Pointer(pParse)).FiSelfTab if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol1)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 { if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol1)).FcolFlags)&int32(COLFLAG_BUSY) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8351, libc.VaList(bp+160, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8376, libc.VaList(bp+160, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName)) return 0 } p3 = pCol1 + 14 @@ -87345,7 +87485,7 @@ expr_code_doover: case int32(TK_AGG_FUNCTION): pInfo = (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo if pInfo == uintptr(0) || int32((*TExpr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || int32((*TExpr)(unsafe.Pointer(pExpr)).FiAgg) >= (*TAggInfo)(unsafe.Pointer(pInfo)).FnFunc { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8412, libc.VaList(bp+160, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8437, libc.VaList(bp+160, pExpr)) } else { return (*TAggInfo)(unsafe.Pointer(pInfo)).FiFirstReg + (*TAggInfo)(unsafe.Pointer(pInfo)).FnColumn + int32((*TExpr)(unsafe.Pointer(pExpr)).FiAgg) } @@ -87357,7 +87497,7 @@ expr_code_doover: if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc)) != uint32(0) { return (*TWindow)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FregResult } - if (*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 { + if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44))&0x4>>2)) != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 { /* SQL functions can be expensive. So try to avoid running them ** multiple times if we know they always give the same result */ return _sqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -int32(1)) @@ -87372,7 +87512,7 @@ expr_code_doover: zId = *(*uintptr)(unsafe.Pointer(pExpr + 8)) pDef = _sqlite3FindFunction(tls, db, zId, nFarg, enc, uint8(0)) if pDef == uintptr(0) || (*TFuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8439, libc.VaList(bp+160, pExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8464, libc.VaList(bp+160, pExpr)) break } if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_INLINE) != uint32(0) && pFarg != uintptr(0) { @@ -87401,7 +87541,7 @@ expr_code_doover: if pFarg != 0 { if constMask != 0 { r1 = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nFarg + *(*int32)(unsafe.Pointer(pParse + 64)) += nFarg } else { r1 = _sqlite3GetTempRange(tls, pParse, nFarg) } @@ -87477,7 +87617,7 @@ expr_code_doover: } n1 = _sqlite3ExprVectorSize(tls, pLeft2) if (*TExpr)(unsafe.Pointer(pExpr)).FiTable != n1 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8022, libc.VaList(bp+160, (*TExpr)(unsafe.Pointer(pExpr)).FiTable, n1)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8047, libc.VaList(bp+160, (*TExpr)(unsafe.Pointer(pExpr)).FiTable, n1)) } return (*TExpr)(unsafe.Pointer(pLeft2)).FiTable + int32((*TExpr)(unsafe.Pointer(pExpr)).FiColumn) case int32(TK_IN): @@ -87540,7 +87680,7 @@ expr_code_doover: _sqlite3VdbeAddOp1(tls, v, int32(OP_RealAffinity), target) } case int32(TK_VECTOR): - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6805, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6830, 0) break /* TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions ** that derive from the right-hand table of a LEFT JOIN. The @@ -87550,7 +87690,7 @@ expr_code_doover: */ fallthrough case int32(TK_IF_NULL_ROW): - okConstFactor = (*TParse)(unsafe.Pointer(pParse)).FokConstFactor + okConstFactor = libc.Uint8FromInt32(int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44)) & 0x4 >> 2))) pAggInfo1 = (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo if pAggInfo1 != 0 { if !((*TAggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode != 0) { @@ -87571,9 +87711,9 @@ expr_code_doover: ** (2) Make sure the computed value really is stored in register ** "target" and not someplace else. */ - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0) /* note (1) above */ + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(0), 2, 0x4) /* note (1) above */ _sqlite3ExprCode(tls, pParse, (*TExpr)(unsafe.Pointer(pExpr)).FpLeft, target) - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor + libc.SetBitFieldPtr8Uint32(pParse+44, uint32(okConstFactor), 2, 0x4) _sqlite3VdbeJumpHere(tls, v, addrINR) break /* @@ -87655,7 +87795,7 @@ expr_code_doover: _sqlite3VdbeResolveLabel(tls, v, endLabel) case int32(TK_RAISE): if !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8463, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8488, 0) return 0 } if int32((*TExpr)(unsafe.Pointer(pExpr)).FaffExpr) == int32(OE_Abort) { @@ -87726,17 +87866,17 @@ func _sqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r if pExpr != uintptr(0) && (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_HasFunc)) != uint32(0) { v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe addr = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once)) - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(0), 2, 0x4) if !((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { if regDest < 0 { - v3 = pParse + 60 + v3 = pParse + 64 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) regDest = v2 } _sqlite3ExprCode(tls, pParse, pExpr, regDest) } - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 2, 0x4) _sqlite3ExprDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr) _sqlite3VdbeJumpHere(tls, v, addr) } else { @@ -87745,7 +87885,7 @@ func _sqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r pItem1 = p + 8 + uintptr((*TExprList)(unsafe.Pointer(p)).FnExpr-int32(1))*32 libc.SetBitFieldPtr16Uint32(pItem1+16+4, libc.BoolUint32(regDest < libc.Int32FromInt32(0)), 3, 0x8) if regDest < 0 { - v5 = pParse + 60 + v5 = pParse + 64 *(*int32)(unsafe.Pointer(v5))++ v4 = *(*int32)(unsafe.Pointer(v5)) regDest = v4 @@ -87776,7 +87916,7 @@ func _sqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin var r1, r2 int32 _, _ = r1, r2 pExpr = _sqlite3ExprSkipCollateAndLikely(tls, pExpr) - if (*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && pExpr != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_REGISTER) && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 { + if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44))&0x4>>2)) != 0 && pExpr != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_REGISTER) && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 { *(*int32)(unsafe.Pointer(pReg)) = 0 r2 = _sqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -int32(1)) } else { @@ -87846,7 +87986,7 @@ func _sqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // ** might choose to code the expression at initialization time. // */ func _sqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { - if (*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 { + if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44))&0x4>>2)) != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 { _sqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { _sqlite3ExprCodeCopy(tls, pParse, pExpr, target) @@ -87890,7 +88030,7 @@ func _sqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, targ v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe /* Never gets this far otherwise */ n = (*TExprList)(unsafe.Pointer(pList)).FnExpr - if !((*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0) { + if !(int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44))&0x4>>2)) != 0) { flags = Tu8(int32(flags) & ^libc.Int32FromInt32(SQLITE_ECEL_FACTOR)) } pItem = pList + 8 @@ -89077,7 +89217,7 @@ type IdxCover = TIdxCover // ** pWalker->u.pIdxCover->pIdx. // */ func _exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) { - if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_COLUMN) && (*TExpr)(unsafe.Pointer(pExpr)).FiTable == (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(_sqlite3TableColumnToIndex(tls, (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { + if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_COLUMN) && (*TExpr)(unsafe.Pointer(pExpr)).FiTable == (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && _sqlite3TableColumnToIndex(tls, (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, int32((*TExpr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { (*TWalker)(unsafe.Pointer(pWalker)).FeCode = uint16(1) return int32(WRC_Abort) } @@ -89598,7 +89738,7 @@ func _analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) nArg = v5 (*TAggInfo_func)(unsafe.Pointer(pItem1)).FpFunc = _sqlite3FindFunction(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(pExpr + 8)), nArg, enc, uint8(0)) if (*TExpr)(unsafe.Pointer(pExpr)).FpLeft != 0 && (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pItem1)).FpFunc)).FfuncFlags&uint32(SQLITE_FUNC_NEEDCOLL) == uint32(0) { - v7 = pParse + 56 + v7 = pParse + 60 v6 = *(*int32)(unsafe.Pointer(v7)) *(*int32)(unsafe.Pointer(v7))++ (*TAggInfo_func)(unsafe.Pointer(pItem1)).FiOBTab = v6 @@ -89614,7 +89754,7 @@ func _analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) (*TAggInfo_func)(unsafe.Pointer(pItem1)).FiOBTab = -int32(1) } if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Distinct)) != uint32(0) && !((*TAggInfo_func)(unsafe.Pointer(pItem1)).FbOBUnique != 0) { - v9 = pParse + 56 + v9 = pParse + 60 v8 = *(*int32)(unsafe.Pointer(v9)) *(*int32)(unsafe.Pointer(v9))++ (*TAggInfo_func)(unsafe.Pointer(pItem1)).FiDistinct = v8 @@ -89699,7 +89839,7 @@ func _sqlite3GetTempReg(tls *libc.TLS, pParse uintptr) (r int32) { var v3 Tu8 _, _, _, _ = v1, v2, v3, v4 if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) return v1 @@ -89707,7 +89847,7 @@ func _sqlite3GetTempReg(tls *libc.TLS, pParse uintptr) (r int32) { v4 = pParse + 31 *(*Tu8)(unsafe.Pointer(v4))-- v3 = *(*Tu8)(unsafe.Pointer(v4)) - return *(*int32)(unsafe.Pointer(pParse + 232 + uintptr(v3)*4)) + return *(*int32)(unsafe.Pointer(pParse + 192 + uintptr(v3)*4)) } // C documentation @@ -89725,7 +89865,7 @@ func _sqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { v2 = pParse + 31 v1 = *(*Tu8)(unsafe.Pointer(v2)) *(*Tu8)(unsafe.Pointer(v2))++ - *(*int32)(unsafe.Pointer(pParse + 232 + uintptr(v1)*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 192 + uintptr(v1)*4)) = iReg } } } @@ -89744,11 +89884,11 @@ func _sqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) (r int32) { i = (*TParse)(unsafe.Pointer(pParse)).FiRangeReg n = (*TParse)(unsafe.Pointer(pParse)).FnRangeReg if nReg <= n { - *(*int32)(unsafe.Pointer(pParse + 48)) += nReg - *(*int32)(unsafe.Pointer(pParse + 44)) -= nReg + *(*int32)(unsafe.Pointer(pParse + 52)) += nReg + *(*int32)(unsafe.Pointer(pParse + 48)) -= nReg } else { i = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nReg + *(*int32)(unsafe.Pointer(pParse + 64)) += nReg } return i } @@ -89866,8 +90006,8 @@ func _sqlite3FirstAvailableRegister(tls *libc.TLS, pParse uintptr, iMin int32) ( func _isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) - if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6653, int32(7)) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Eponymous) != uint32(0) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Shadow) != uint32(0) && _sqlite3ReadOnlyShadowTables(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8513, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6678, int32(7)) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Eponymous) != uint32(0) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Shadow) != uint32(0) && _sqlite3ReadOnlyShadowTables(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb) != 0 { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8538, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) return int32(1) } return 0 @@ -89885,10 +90025,10 @@ func _isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int32) { func _renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { bp := tls.Alloc(48) defer tls.Free(48) - (*TParse)(unsafe.Pointer(pParse)).FcolNamesSet = uint8(1) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+8541, libc.VaList(bp+8, zDb, zDb, bTemp, zWhen, bNoDQS)) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 0, 0x1) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+8566, libc.VaList(bp+8, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+8716, libc.VaList(bp+8, zDb, zWhen, bNoDQS)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+8741, libc.VaList(bp+8, zDb, zWhen, bNoDQS)) } } @@ -89904,9 +90044,9 @@ func _renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, func _renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { bp := tls.Alloc(32) defer tls.Free(32) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+8890, libc.VaList(bp+8, zDb, zDb)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+8915, libc.VaList(bp+8, zDb, zDb)) if bTemp == 0 { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+9037, 0) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+9062, 0) } } @@ -89962,7 +90102,7 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName ** in database iDb. If so, this is an error. */ if _sqlite3FindTable(tls, db, zName, zDb) != 0 || _sqlite3FindIndex(tls, db, zName, zDb) != 0 || _sqlite3IsShadowTableOf(tls, db, pTab, zName) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9188, libc.VaList(bp+8, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9213, libc.VaList(bp+8, zName)) goto exit_rename_table } /* Make sure it is not a system table being altered, or a reserved name @@ -89971,11 +90111,11 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName if SQLITE_OK != _isAlterableTable(tls, pParse, pTab) { goto exit_rename_table } - if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+9247, zName) { + if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+9272, zName) { goto exit_rename_table } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9253, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9278, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table } /* Invoke the authorization callback. */ @@ -90005,21 +90145,21 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName nTabName = _sqlite3Utf8CharLen(tls, zTabName, -int32(1)) /* Rewrite all CREATE TABLE, INDEX, TRIGGER or VIEW statements in ** the schema to use the new table name. */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+9280, libc.VaList(bp+8, zDb, zDb, zTabName, zName, libc.BoolInt32(iDb == int32(1)), zTabName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+9305, libc.VaList(bp+8, zDb, zDb, zTabName, zName, libc.BoolInt32(iDb == int32(1)), zTabName)) /* Update the tbl_name and name columns of the sqlite_schema table ** as required. */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+9464, libc.VaList(bp+8, zDb, zName, zName, zName, nTabName, zTabName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+9489, libc.VaList(bp+8, zDb, zName, zName, zName, nTabName, zTabName)) /* If the sqlite_sequence table exists in this database, then update ** it with the new table name. */ - if _sqlite3FindTable(tls, db, __ccgo_ts+9769, zDb) != 0 { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+9785, libc.VaList(bp+8, zDb, zName, (*TTable)(unsafe.Pointer(pTab)).FzName)) + if _sqlite3FindTable(tls, db, __ccgo_ts+9794, zDb) != 0 { + _sqlite3NestedParse(tls, pParse, __ccgo_ts+9810, libc.VaList(bp+8, zDb, zName, (*TTable)(unsafe.Pointer(pTab)).FzName)) } /* If the table being renamed is not itself part of the temp database, ** edit view and trigger definitions within the temp database ** as required. */ if iDb != int32(1) { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+9843, libc.VaList(bp+8, zDb, zTabName, zName, zTabName, zDb, zName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+9868, libc.VaList(bp+8, zDb, zTabName, zName, zTabName, zDb, zName)) } /* If this is a virtual table, invoke the xRename() function if ** one is defined. The xRename() callback will modify the names @@ -90027,7 +90167,7 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName ** SQLite tables) that are identified by the name of the virtual table. */ if pVTab != 0 { - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) i = v1 @@ -90035,7 +90175,7 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName _sqlite3VdbeAddOp4(tls, v, int32(OP_VRename), i, 0, 0, pVTab, -int32(11)) } _renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+10108, 0) + _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+10133, 0) goto exit_rename_table exit_rename_table: ; @@ -90052,7 +90192,7 @@ exit_rename_table: func _sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { bp := tls.Alloc(32) defer tls.Free(32) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+10121, libc.VaList(bp+8, zErr, zDb, zTab)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+10146, libc.VaList(bp+8, zErr, zDb, zTab)) } // C documentation @@ -90092,11 +90232,11 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr ** column must not be NULL. */ if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10159, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10184, 0) return } if (*TTable)(unsafe.Pointer(pNew)).FpIndex != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10191, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10216, 0) return } if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) == 0 { @@ -90112,10 +90252,10 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr FpFKey uintptr FpDfltList uintptr })(unsafe.Pointer(pNew + 64))).FpFKey != 0 && pDflt != 0 { - _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10218) + _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10243) } if int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { - _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10277) + _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10302) } /* Ensure the default expression is something that sqlite3ValueFromExpr() ** can handle (i.e. not CURRENT_TIME etc.) @@ -90127,13 +90267,13 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr return } if !(*(*uintptr)(unsafe.Pointer(bp)) != 0) { - _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10330) + _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10355) } _sqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp))) } } else { if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_STORED) != 0 { - _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10376) + _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10401) } } /* Modify the CREATE TABLE statement. */ @@ -90147,7 +90287,7 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } /* substr() operations on characters, but addColOffset is in bytes. So we ** have to use printf() to translate between these units: */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+10403, libc.VaList(bp+16, zDb, (*(*struct { + _sqlite3NestedParse(tls, pParse, __ccgo_ts+10428, libc.VaList(bp+16, zDb, (*(*struct { FaddColOffset int32 FpFKey uintptr FpDfltList uintptr @@ -90175,7 +90315,7 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr _renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterAdd)) /* Verify that constraints are still satisfied */ if (*TTable)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Strict) != uint32(0) { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+10549, libc.VaList(bp+16, zTab, zDb)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+10574, libc.VaList(bp+16, zTab, zDb)) } } } @@ -90213,12 +90353,12 @@ func _sqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { goto exit_begin_add_column } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10902, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10927, 0) goto exit_begin_add_column } /* Make sure this is not an attempt to ALTER a view. */ if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10936, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10961, 0) goto exit_begin_add_column } if SQLITE_OK != _isAlterableTable(tls, pParse, pTab) { @@ -90233,7 +90373,7 @@ func _sqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { ** table because user table are not allowed to have the "sqlite_" ** prefix on their name. */ - pNew = _sqlite3DbMallocZero(tls, db, uint64(104)) + pNew = _sqlite3DbMallocZero(tls, db, uint64(120)) if !(pNew != 0) { goto exit_begin_add_column } @@ -90241,8 +90381,8 @@ func _sqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { (*TTable)(unsafe.Pointer(pNew)).FnTabRef = uint32(1) (*TTable)(unsafe.Pointer(pNew)).FnCol = (*TTable)(unsafe.Pointer(pTab)).FnCol nAlloc = (int32((*TTable)(unsafe.Pointer(pNew)).FnCol)-int32(1))/int32(8)*int32(8) + int32(8) - (*TTable)(unsafe.Pointer(pNew)).FaCol = _sqlite3DbMallocZero(tls, db, uint64(uint64(16)*libc.Uint64FromInt32(nAlloc))) - (*TTable)(unsafe.Pointer(pNew)).FzName = _sqlite3MPrintf(tls, db, __ccgo_ts+10966, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + (*TTable)(unsafe.Pointer(pNew)).FaCol = _sqlite3DbMallocZero(tls, db, uint64(16)*uint64(libc.Uint32FromInt32(nAlloc))) + (*TTable)(unsafe.Pointer(pNew)).FzName = _sqlite3MPrintf(tls, db, __ccgo_ts+10991, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) if !((*TTable)(unsafe.Pointer(pNew)).FaCol != 0) || !((*TTable)(unsafe.Pointer(pNew)).FzName != 0) { goto exit_begin_add_column } @@ -90303,18 +90443,18 @@ func _isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) (r i _, _ = zType, v1 zType = uintptr(0) if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { - zType = __ccgo_ts + 10985 + zType = __ccgo_ts + 11010 } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { - zType = __ccgo_ts + 10990 + zType = __ccgo_ts + 11015 } if zType != 0 { if bDrop != 0 { - v1 = __ccgo_ts + 11004 + v1 = __ccgo_ts + 11029 } else { - v1 = __ccgo_ts + 11021 + v1 = __ccgo_ts + 11046 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11039, libc.VaList(bp+8, v1, zType, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11064, libc.VaList(bp+8, v1, zType, (*TTable)(unsafe.Pointer(pTab)).FzName)) return int32(1) } return 0 @@ -90361,21 +90501,9 @@ func _sqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld if !(zOld != 0) { goto exit_rename_column } - iCol = 0 - for { - if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } - if 0 == _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName, zOld) { - break - } - goto _1 - _1: - ; - iCol++ - } - if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11057, libc.VaList(bp+8, pOld)) + iCol = _sqlite3ColumnIndex(tls, pTab, zOld) + if iCol < 0 { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11082, libc.VaList(bp+8, pOld)) goto exit_rename_column } /* Ensure the schema contains no double-quoted strings */ @@ -90391,11 +90519,11 @@ func _sqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld goto exit_rename_column } bQuote = libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*TToken)(unsafe.Pointer(pNew)).Fz)))]) & int32(0x80) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+11078, libc.VaList(bp+8, zDb, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.BoolInt32(iSchema == int32(1)), (*TTable)(unsafe.Pointer(pTab)).FzName)) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+11260, libc.VaList(bp+8, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+11103, libc.VaList(bp+8, zDb, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.BoolInt32(iSchema == int32(1)), (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+11285, libc.VaList(bp+8, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) /* Drop and reload the database schema. */ _renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iSchema == int32(1)), __ccgo_ts+10108, int32(1)) + _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iSchema == int32(1)), __ccgo_ts+10133, int32(1)) goto exit_rename_column exit_rename_column: ; @@ -90871,11 +90999,11 @@ func _renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType u zT = Xsqlite3_value_text(tls, pType) zN = Xsqlite3_value_text(tls, pObject) if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - v1 = __ccgo_ts + 11391 + v1 = __ccgo_ts + 11416 } else { v1 = __ccgo_ts + 1665 } - zErr = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+11393, libc.VaList(bp+8, zT, zN, v1, zWhen, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg)) + zErr = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+11418, libc.VaList(bp+8, zT, zN, v1, zWhen, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -int32(1)) _sqlite3DbFree(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, zErr) } @@ -90946,30 +91074,34 @@ func _renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLi // ** is initialized by this function before it is used. // */ func _renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) (r int32) { - var rc, v1 int32 - _, _ = rc, v1 + var flags Tu64 + var iDb, rc int32 + _, _, _ = flags, iDb, rc _sqlite3ParseObjectInit(tls, p, db) if zSql == uintptr(0) { return int32(SQLITE_NOMEM) } - if Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+11416, int32(7)) != 0 { - return _sqlite3CorruptError(tls, int32(118071)) + if Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+11441, int32(7)) != 0 { + return _sqlite3CorruptError(tls, int32(118867)) } if bTemp != 0 { - v1 = int32(1) + (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = uint8(1) } else { - v1 = _sqlite3FindDbName(tls, db, zDb) + iDb = _sqlite3FindDbName(tls, db, zDb) + (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(iDb) } - (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(v1) (*TParse)(unsafe.Pointer(p)).FeParseMode = uint8(PARSE_MODE_RENAME) (*TParse)(unsafe.Pointer(p)).Fdb = db (*TParse)(unsafe.Pointer(p)).FnQueryLoop = int16(1) + flags = (*Tsqlite3)(unsafe.Pointer(db)).Fflags + *(*Tu64)(unsafe.Pointer(db + 48)) |= libc.Uint64FromInt32(libc.Int32FromInt32(0x00040)) << libc.Int32FromInt32(32) rc = _sqlite3RunParser(tls, p, zSql) + (*Tsqlite3)(unsafe.Pointer(db)).Fflags = flags if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = int32(SQLITE_NOMEM) } if rc == SQLITE_OK && ((*TParse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*TParse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*TParse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { - rc = _sqlite3CorruptError(tls, int32(118082)) + rc = _sqlite3CorruptError(tls, int32(118888)) } (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = uint8(0) return rc @@ -90990,9 +91122,8 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, bp := tls.Alloc(32) defer tls.Free(32) var db, pBest, zBuf1, zBuf2, zOut, zQuot, zReplace, v1 uintptr - var iOff, nOut, rc int32 - var nNew, nQuot, nSql Ti64 - var nReplace Tu32 + var iOff, rc int32 + var nNew, nOut, nQuot, nReplace, nSql Ti64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = db, iOff, nNew, nOut, nQuot, nReplace, nSql, pBest, rc, zBuf1, zBuf2, zOut, zQuot, zReplace, v1 nNew = int64(_sqlite3Strlen30(tls, zNew)) nSql = int64(_sqlite3Strlen30(tls, zSql)) @@ -91008,15 +91139,15 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, ** ALTER TABLE statement was quoted (bQuote==1), then set zNew to ** point to zQuot so that all substitutions are made using the ** quoted version of the new column name. */ - zQuot = _sqlite3MPrintf(tls, db, __ccgo_ts+11424, libc.VaList(bp+8, zNew)) + zQuot = _sqlite3MPrintf(tls, db, __ccgo_ts+11449, libc.VaList(bp+8, zNew)) if zQuot == uintptr(0) { return int32(SQLITE_NOMEM) } else { nQuot = int64(_sqlite3Strlen30(tls, zQuot) - int32(1)) } - zOut = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nSql+int64((*TRenameCtx)(unsafe.Pointer(pRename)).FnList)*nQuot+int64(1))) + zOut = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nSql)+libc.Uint64FromInt32((*TRenameCtx)(unsafe.Pointer(pRename)).FnList)*libc.Uint64FromInt64(nQuot)+uint64(1)) } else { - zOut = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64((nSql*int64(2)+int64(1))*int64(3))) + zOut = _sqlite3DbMallocZero(tls, db, (uint64(2)*libc.Uint64FromInt64(nSql)+uint64(1))*uint64(3)) if zOut != 0 { zBuf1 = zOut + uintptr(nSql*int64(2)+int64(1)) zBuf2 = zOut + uintptr(nSql*int64(4)+int64(2)) @@ -91027,16 +91158,16 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, ** with the new column name, or with single-quoted versions of themselves. ** All that remains is to construct and return the edited SQL string. */ if zOut != 0 { - nOut = int32(nSql) + nOut = nSql libc.Xmemcpy(tls, zOut, zSql, libc.Uint64FromInt64(nSql)) for (*TRenameCtx)(unsafe.Pointer(pRename)).FpList != 0 { pBest = _renameColumnTokenNext(tls, pRename) if zNew != 0 { - if bQuote == 0 && _sqlite3IsIdChar(tls, libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz)))) != 0 { - nReplace = libc.Uint32FromInt64(nNew) + if bQuote == 0 && _sqlite3IsIdChar(tls, *(*Tu8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz))) != 0 { + nReplace = nNew zReplace = zNew } else { - nReplace = libc.Uint32FromInt64(nQuot) + nReplace = nQuot zReplace = zQuot if int32(*(*int8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == int32('"') { nReplace++ @@ -91053,21 +91184,21 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = 0 _sqlite3Dequote(tls, zBuf1) if int32(*(*int8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == int32('\'') { - v1 = __ccgo_ts + 11391 + v1 = __ccgo_ts + 11416 } else { v1 = __ccgo_ts + 1665 } - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, __ccgo_ts+11430, libc.VaList(bp+8, zBuf1, v1)) + Xsqlite3_snprintf(tls, int32(nSql*libc.Int64FromInt32(2)), zBuf2, __ccgo_ts+11455, libc.VaList(bp+8, zBuf1, v1)) zReplace = zBuf2 - nReplace = libc.Uint32FromInt32(_sqlite3Strlen30(tls, zReplace)) + nReplace = int64(_sqlite3Strlen30(tls, zReplace)) } iOff = int32(int64((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz) - int64(zSql)) - if (*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn != nReplace { - libc.Xmemmove(tls, zOut+uintptr(libc.Uint32FromInt32(iOff)+nReplace), zOut+uintptr(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn), uint64(libc.Uint32FromInt32(nOut)-(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) - nOut = int32(uint32(nOut) + (nReplace - (*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) + if libc.Int64FromUint32((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn) != nReplace { + libc.Xmemmove(tls, zOut+uintptr(int64(iOff)+nReplace), zOut+uintptr(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn), libc.Uint64FromInt64(nOut-libc.Int64FromUint32(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) + nOut += nReplace - libc.Int64FromUint32((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn) *(*int8)(unsafe.Pointer(zOut + uintptr(nOut))) = int8('\000') } - libc.Xmemcpy(tls, zOut+uintptr(iOff), zReplace, uint64(nReplace)) + libc.Xmemcpy(tls, zOut+uintptr(iOff), zReplace, libc.Uint64FromInt64(nReplace)) _sqlite3DbFree(tls, db, pBest) } Xsqlite3_result_text(tls, pCtx, zOut, -int32(1), uintptr(-libc.Int32FromInt32(1))) @@ -91093,7 +91224,7 @@ func _renameSetENames(tls *libc.TLS, pEList uintptr, val int32) { if !(i < (*TExprList)(unsafe.Pointer(pEList)).FnExpr) { break } - libc.SetBitFieldPtr16Uint32(pEList+8+uintptr(i)*32+16+4, libc.Uint32FromInt32(val), 0, 0x3) + libc.SetBitFieldPtr16Uint32(pEList+8+uintptr(i)*32+16+4, libc.Uint32FromInt32(val&libc.Int32FromInt32(0x3)), 0, 0x3) goto _1 _1: ; @@ -91403,7 +91534,7 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp pSelect = (*(*struct { FpSelect uintptr })(unsafe.Pointer(&(*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 32))).FpNewTable)).Fu))).FpSelect - *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_View)) + *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= ^libc.Uint32FromInt32(SF_View) (*(*TParse)(unsafe.Pointer(bp + 32))).Frc = SQLITE_OK _sqlite3SelectPrep(tls, bp+32, pSelect, uintptr(0)) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -91670,7 +91801,7 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt })(unsafe.Pointer(&(*TTable)(unsafe.Pointer(pTab)).Fu))).FpSelect libc.Xmemset(tls, bp+504, 0, uint64(56)) (*(*TNameContext)(unsafe.Pointer(bp + 504))).FpParse = bp - *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_View)) + *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= ^libc.Uint32FromInt32(SF_View) _sqlite3SelectPrep(tls, bp, (*(*struct { FpSelect uintptr })(unsafe.Pointer(&(*TTable)(unsafe.Pointer(pTab)).Fu))).FpSelect, bp+504) @@ -91853,7 +91984,7 @@ func _renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uin pSelect = (*(*struct { FpSelect uintptr })(unsafe.Pointer(&(*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).Fu))).FpSelect - *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_View)) + *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= ^libc.Uint32FromInt32(SF_View) (*(*TParse)(unsafe.Pointer(bp))).Frc = SQLITE_OK _sqlite3SelectPrep(tls, bp, pSelect, uintptr(0)) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -91937,8 +92068,9 @@ func _renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uin func _renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { bp := tls.Alloc(480) defer tls.Free(480) - var bNoDQS, bTemp, flags, i1, i2, isLegacy, rc int32 + var bNoDQS, bTemp, i1, i2, isLegacy, rc int32 var db, zDb, zInput, zWhen uintptr + var flags Tu64 var xAuth Tsqlite3_xauth var _ /* sNC at bp+424 */ TNameContext var _ /* sParse at bp+0 */ TParse @@ -91954,12 +92086,12 @@ func _renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt (*Tsqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) _ = NotUsed if zDb != 0 && zInput != 0 { - flags = libc.Int32FromUint64((*Tsqlite3)(unsafe.Pointer(db)).Fflags) + flags = (*Tsqlite3)(unsafe.Pointer(db)).Fflags if bNoDQS != 0 { *(*Tu64)(unsafe.Pointer(db + 48)) &= libc.Uint64FromInt32(^(libc.Int32FromInt32(SQLITE_DqsDML) | libc.Int32FromInt32(SQLITE_DqsDDL))) } rc = _renameParseSql(tls, bp, zDb, db, zInput, bTemp) - *(*Tu64)(unsafe.Pointer(db + 48)) |= libc.Uint64FromInt32(flags & (libc.Int32FromInt32(SQLITE_DqsDML) | libc.Int32FromInt32(SQLITE_DqsDDL))) + (*Tsqlite3)(unsafe.Pointer(db)).Fflags = flags if rc == SQLITE_OK { if isLegacy == 0 && (*(*TParse)(unsafe.Pointer(bp))).FpNewTable != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FeTabType) == int32(TABTYP_VIEW) { libc.Xmemset(tls, bp+424, 0, uint64(56)) @@ -92033,7 +92165,7 @@ func _dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr pTab = (*(*TParse)(unsafe.Pointer(bp))).FpNewTable if pTab == uintptr(0) || int32((*TTable)(unsafe.Pointer(pTab)).FnCol) == int32(1) || iCol >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { /* This can happen if the sqlite_schema table is corrupt */ - rc = _sqlite3CorruptError(tls, int32(119046)) + rc = _sqlite3CorruptError(tls, int32(119856)) goto drop_column_done } pCol = _renameTokenFind(tls, bp, uintptr(0), (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName) @@ -92050,7 +92182,7 @@ func _dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr (*TRenameToken)(unsafe.Pointer(pCol)).Ft.Fz-- } } - zNew = _sqlite3MPrintf(tls, db, __ccgo_ts+11435, libc.VaList(bp+432, int64((*TRenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql), zSql, zEnd)) + zNew = _sqlite3MPrintf(tls, db, __ccgo_ts+11460, libc.VaList(bp+432, int64((*TRenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql), zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -int32(1), uintptr(-libc.Int32FromInt32(1))) Xsqlite3_free(tls, zNew) goto drop_column_done @@ -92105,23 +92237,23 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName } iCol = _sqlite3ColumnIndex(tls, pTab, zCol) if iCol < 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11057, libc.VaList(bp+8, pName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11082, libc.VaList(bp+8, pName)) goto exit_drop_column } /* Do not allow the user to drop a PRIMARY KEY column or a column ** constrained by a UNIQUE constraint. */ if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FcolFlags)&(libc.Int32FromInt32(COLFLAG_PRIMKEY)|libc.Int32FromInt32(COLFLAG_UNIQUE)) != 0 { if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 { - v1 = __ccgo_ts + 11442 + v1 = __ccgo_ts + 11467 } else { - v1 = __ccgo_ts + 5672 + v1 = __ccgo_ts + 5698 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11454, libc.VaList(bp+8, v1, zCol)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11479, libc.VaList(bp+8, v1, zCol)) goto exit_drop_column } /* Do not allow the number of columns to go to zero */ if int32((*TTable)(unsafe.Pointer(pTab)).FnCol) <= int32(1) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11482, libc.VaList(bp+8, zCol)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11507, libc.VaList(bp+8, zCol)) goto exit_drop_column } /* Edit the sqlite_schema table */ @@ -92133,31 +92265,31 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName } _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+1665, 0) _renameFixQuotes(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1))) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+11530, libc.VaList(bp+8, zDb, iDb, iCol, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+11555, libc.VaList(bp+8, zDb, iDb, iCol, (*TTable)(unsafe.Pointer(pTab)).FzName)) /* Drop and reload the database schema. */ _renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+11651, int32(1)) + _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+11676, int32(1)) /* Edit rows of table on disk */ if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FcolFlags)&int32(COLFLAG_VIRTUAL) == 0 { pPk = uintptr(0) nField = 0 v = _sqlite3GetVdbe(tls, pParse) - v3 = pParse + 56 + v3 = pParse + 60 v2 = *(*int32)(unsafe.Pointer(v3)) *(*int32)(unsafe.Pointer(v3))++ iCur = v2 _sqlite3OpenTable(tls, pParse, iCur, iDb, pTab, int32(OP_OpenWrite)) addr = _sqlite3VdbeAddOp1(tls, v, int32(OP_Rewind), iCur) - v5 = pParse + 60 + v5 = pParse + 64 *(*int32)(unsafe.Pointer(v5))++ v4 = *(*int32)(unsafe.Pointer(v5)) reg = v4 if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) { _sqlite3VdbeAddOp2(tls, v, int32(OP_Rowid), iCur, reg) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) } else { pPk = _sqlite3PrimaryKeyIndex(tls, pTab) - *(*int32)(unsafe.Pointer(pParse + 60)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnColumn) + *(*int32)(unsafe.Pointer(pParse + 64)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnColumn) i = 0 for { if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) { @@ -92171,7 +92303,7 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName } nField = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) } - v8 = pParse + 60 + v8 = pParse + 64 *(*int32)(unsafe.Pointer(v8))++ v7 = *(*int32)(unsafe.Pointer(v8)) regRec = v7 @@ -92182,8 +92314,8 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName } if i != iCol && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16))).FcolFlags)&int32(COLFLAG_VIRTUAL) == 0 { if pPk != 0 { - iPos = int32(_sqlite3TableColumnToIndex(tls, pPk, int16(i))) - iColPos = int32(_sqlite3TableColumnToIndex(tls, pPk, int16(iCol))) + iPos = _sqlite3TableColumnToIndex(tls, pPk, i) + iColPos = _sqlite3TableColumnToIndex(tls, pPk, iCol) if iPos < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) { goto _9 } @@ -92244,27 +92376,27 @@ var _aAlterTableFuncs = [5]TFuncDef{ 0: { FnArg: int16(9), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)), - FzName: __ccgo_ts + 11669, + FzName: __ccgo_ts + 11694, }, 1: { FnArg: int16(7), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)), - FzName: __ccgo_ts + 11690, + FzName: __ccgo_ts + 11715, }, 2: { FnArg: int16(7), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)), - FzName: __ccgo_ts + 11710, + FzName: __ccgo_ts + 11735, }, 3: { FnArg: int16(3), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)), - FzName: __ccgo_ts + 11729, + FzName: __ccgo_ts + 11754, }, 4: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)), - FzName: __ccgo_ts + 11748, + FzName: __ccgo_ts + 11773, }, } @@ -92475,8 +92607,13 @@ func _openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zW ** side-effect of the CREATE TABLE statement is to leave the rootpage ** of the new table in register pParse->regRoot. This is important ** because the OpenWrite opcode below will be needing it. */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+11851, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, _aTable[i].FzCols)) - aRoot[i] = libc.Uint32FromInt32((*TParse)(unsafe.Pointer(pParse)).FregRoot) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+11876, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, _aTable[i].FzCols)) + aRoot[i] = libc.Uint32FromInt32((*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FregRoot) aCreateTbl[i] = uint8(OPFLAG_P2ISREG) } } else { @@ -92486,10 +92623,10 @@ func _openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zW aRoot[i] = (*TTable)(unsafe.Pointer(pStat)).Ftnum _sqlite3TableLock(tls, pParse, iDb, aRoot[i], uint8(1), zTab) if zWhere != 0 { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+11874, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+11899, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else { if (*Tsqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+11904, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+11929, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { /* The sqlite_stat[134] table already exists. Delete all rows. */ _sqlite3VdbeAddOp2(tls, v, int32(OP_Clear), libc.Int32FromUint32(aRoot[i]), iDb) @@ -92521,15 +92658,15 @@ var _aTable = [3]struct { FzCols uintptr }{ 0: { - FzName: __ccgo_ts + 11771, - FzCols: __ccgo_ts + 11784, + FzName: __ccgo_ts + 11796, + FzCols: __ccgo_ts + 11809, }, 1: { - FzName: __ccgo_ts + 11797, - FzCols: __ccgo_ts + 11810, + FzName: __ccgo_ts + 11822, + FzCols: __ccgo_ts + 11835, }, 2: { - FzName: __ccgo_ts + 11838, + FzName: __ccgo_ts + 11863, }, } @@ -92743,7 +92880,8 @@ func _statAccumDestructor(tls *libc.TLS, pOld uintptr) { // */ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db, p, pSpace uintptr - var i, mxSample, n, nCol, nColUp, nKeyCol, v1, v2 int32 + var i, mxSample, nCol, nColUp, nKeyCol, v1, v2 int32 + var n Ti64 _, _, _, _, _, _, _, _, _, _, _ = db, i, mxSample, n, nCol, nColUp, nKeyCol, p, pSpace, v1, v2 /* Bytes of space to allocate */ db = Xsqlite3_context_db_handle(tls, context) if (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_Stat4)) == uint32(0) { @@ -92759,12 +92897,12 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { nColUp = nCol nKeyCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) /* Allocate the space required for the StatAccum object */ - n = libc.Int32FromUint64(uint64(136) + uint64(8)*libc.Uint64FromInt32(nColUp)) /* StatAccum.anDLt */ - n = int32(uint64(n) + libc.Uint64FromInt64(8)*libc.Uint64FromInt32(nColUp)) /* StatAccum.anEq */ + n = libc.Int64FromUint64(uint64(136) + uint64(8)*libc.Uint64FromInt32(nColUp)) /* StatAccum.anDLt */ + n = Ti64(uint64(n) + uint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(nColUp))) /* StatAccum.anEq */ if mxSample != 0 { - n = int32(uint64(n) + (libc.Uint64FromInt64(8)*libc.Uint64FromInt32(nColUp) + libc.Uint64FromInt64(48)*libc.Uint64FromInt32(nCol+mxSample) + libc.Uint64FromInt64(8)*libc.Uint64FromInt32(3)*libc.Uint64FromInt32(nColUp)*libc.Uint64FromInt32(nCol+mxSample))) + n = Ti64(uint64(n) + uint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(nColUp)+libc.Uint64FromInt64(48)*libc.Uint64FromInt32(nCol+mxSample)+libc.Uint64FromInt64(8)*libc.Uint64FromInt32(3)*libc.Uint64FromInt32(nColUp)*libc.Uint64FromInt32(nCol+mxSample))) } - p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(n)) + p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(n)) if p == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -92772,7 +92910,7 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { (*TStatAccum)(unsafe.Pointer(p)).Fdb = db (*TStatAccum)(unsafe.Pointer(p)).FnEst = libc.Uint64FromInt64(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) (*TStatAccum)(unsafe.Pointer(p)).FnRow = uint64(0) - (*TStatAccum)(unsafe.Pointer(p)).FnLimit = int32(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) + (*TStatAccum)(unsafe.Pointer(p)).FnLimit = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) (*TStatAccum)(unsafe.Pointer(p)).FnCol = nCol (*TStatAccum)(unsafe.Pointer(p)).FnKeyCol = nKeyCol (*TStatAccum)(unsafe.Pointer(p)).FnSkipAhead = uint8(0) @@ -92831,7 +92969,7 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var _statInitFuncdef = TFuncDef{ FnArg: int16(4), FfuncFlags: uint32(SQLITE_UTF8), - FzName: __ccgo_ts + 11922, + FzName: __ccgo_ts + 11947, } func init() { @@ -93205,7 +93343,7 @@ func _statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var _statPushFuncdef = TFuncDef{ FnArg: int16(libc.Int32FromInt32(2) + libc.Int32FromInt32(IsStat4)), FfuncFlags: uint32(SQLITE_UTF8), - FzName: __ccgo_ts + 11932, + FzName: __ccgo_ts + 11957, } func init() { @@ -93255,7 +93393,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } else { v1 = (*TStatAccum)(unsafe.Pointer(p)).FnRow } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11942, libc.VaList(bp+72, v1)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11967, libc.VaList(bp+72, v1)) i = 0 for { if !(i < (*TStatAccum)(unsafe.Pointer(p)).FnKeyCol) { @@ -93266,7 +93404,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if iVal == uint64(2) && (*TStatAccum)(unsafe.Pointer(p)).FnRow*uint64(10) <= nDistinct*uint64(11) { iVal = uint64(1) } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11947, libc.VaList(bp+72, iVal)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11972, libc.VaList(bp+72, iVal)) goto _2 _2: ; @@ -93305,7 +93443,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { if !(i1 < (*TStatAccum)(unsafe.Pointer(p)).FnCol) { break } - Xsqlite3_str_appendf(tls, bp+32, __ccgo_ts+11953, libc.VaList(bp+72, *(*TtRowcnt)(unsafe.Pointer(aCnt + uintptr(i1)*8)))) + Xsqlite3_str_appendf(tls, bp+32, __ccgo_ts+11978, libc.VaList(bp+72, *(*TtRowcnt)(unsafe.Pointer(aCnt + uintptr(i1)*8)))) goto _3 _3: ; @@ -93323,7 +93461,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var _statGetFuncdef = TFuncDef{ FnArg: int16(libc.Int32FromInt32(1) + libc.Int32FromInt32(IsStat4)), FfuncFlags: uint32(SQLITE_UTF8), - FzName: __ccgo_ts + 11959, + FzName: __ccgo_ts + 11984, } func init() { @@ -93389,7 +93527,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint /* Do not gather statistics on views or virtual tables */ return } - if Xsqlite3_strlike(tls, __ccgo_ts+11968, (*TTable)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, __ccgo_ts+11993, (*TTable)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { /* Do not gather statistics on system tables */ return } @@ -93398,12 +93536,12 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint return } if (*Tsqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - pStat1 = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint64FromInt64(104)+libc.Uint64FromInt32(13))) + pStat1 = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint64FromInt64(120)+libc.Uint64FromInt32(13))) if pStat1 == uintptr(0) { return } - (*TTable)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 - libc.Xmemcpy(tls, (*TTable)(unsafe.Pointer(pStat1)).FzName, __ccgo_ts+11771, uint64(13)) + (*TTable)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*120 + libc.Xmemcpy(tls, (*TTable)(unsafe.Pointer(pStat1)).FzName, __ccgo_ts+11796, uint64(13)) (*TTable)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*TTable)(unsafe.Pointer(pStat1)).FiPKey = int16(-int32(1)) _sqlite3VdbeAddOp4(tls, (*TParse)(unsafe.Pointer(pParse)).FpVdbe, int32(OP_Noop), 0, 0, 0, pStat1, -int32(6)) @@ -93605,7 +93743,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint if !(j < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) { break } - k = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) + k = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) _sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iIdxCur, k, regKey+j) goto _17 _17: @@ -93636,7 +93774,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint addrGotoEnd = 0 } _callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+11978, 0) + _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+12003, 0) _sqlite3VdbeAddOp2(tls, v, int32(OP_NewRowid), iStatCur, regNewRowid) _sqlite3VdbeAddOp3(tls, v, int32(OP_Insert), iStatCur, regTemp, regNewRowid) _sqlite3VdbeChangeP4(tls, v, -int32(1), pStat1, -int32(5)) @@ -93727,7 +93865,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint _sqlite3VdbeAddOp2(tls, v, int32(OP_Count), iTabCur, regStat1) jZeroRows = _sqlite3VdbeAddOp1(tls, v, int32(OP_IfNot), regStat1) _sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, regIdxname) - _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+11978, 0) + _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+12003, 0) _sqlite3VdbeAddOp2(tls, v, int32(OP_NewRowid), iStatCur, regNewRowid) _sqlite3VdbeAddOp3(tls, v, int32(OP_Insert), iStatCur, regTemp, regNewRowid) _sqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -93764,7 +93902,7 @@ func _analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { pSchema = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FpSchema _sqlite3BeginWriteOperation(tls, pParse, 0, iDb) iStatCur = (*TParse)(unsafe.Pointer(pParse)).FnTab - *(*int32)(unsafe.Pointer(pParse + 56)) += int32(3) + *(*int32)(unsafe.Pointer(pParse + 60)) += int32(3) _openStatTable(tls, pParse, iDb, iStatCur, uintptr(0), uintptr(0)) iMem = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) iTab = (*TParse)(unsafe.Pointer(pParse)).FnTab @@ -93797,11 +93935,11 @@ func _analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr iDb = _sqlite3SchemaToIndex(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*TTable)(unsafe.Pointer(pTab)).FpSchema) _sqlite3BeginWriteOperation(tls, pParse, 0, iDb) iStatCur = (*TParse)(unsafe.Pointer(pParse)).FnTab - *(*int32)(unsafe.Pointer(pParse + 56)) += int32(3) + *(*int32)(unsafe.Pointer(pParse + 60)) += int32(3) if pOnlyIdx != 0 { - _openStatTable(tls, pParse, iDb, iStatCur, (*TIndex)(unsafe.Pointer(pOnlyIdx)).FzName, __ccgo_ts+11982) + _openStatTable(tls, pParse, iDb, iStatCur, (*TIndex)(unsafe.Pointer(pOnlyIdx)).FzName, __ccgo_ts+12007) } else { - _openStatTable(tls, pParse, iDb, iStatCur, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+11986) + _openStatTable(tls, pParse, iDb, iStatCur, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+12011) } _analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*TParse)(unsafe.Pointer(pParse)).FnMem+int32(1), (*TParse)(unsafe.Pointer(pParse)).FnTab) _loadAnalysis(tls, pParse, iDb) @@ -93965,17 +94103,17 @@ func _decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, __ccgo_ts+11990, z) == 0 { + if Xsqlite3_strglob(tls, __ccgo_ts+12015, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 2, 0x4) } else { - if Xsqlite3_strglob(tls, __ccgo_ts+12001, z) == 0 { + if Xsqlite3_strglob(tls, __ccgo_ts+12026, z) == 0 { sz = _sqlite3Atoi(tls, z+uintptr(3)) if sz < int32(2) { sz = int32(2) } (*TIndex)(unsafe.Pointer(pIndex)).FszIdxRow = _sqlite3LogEst(tls, libc.Uint64FromInt32(sz)) } else { - if Xsqlite3_strglob(tls, __ccgo_ts+12011, z) == 0 { + if Xsqlite3_strglob(tls, __ccgo_ts+12036, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 6, 0x40) } } @@ -93987,13 +94125,6 @@ func _decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, z++ } } - /* Set the bLowQual flag if the peak number of rows obtained - ** from a full equality match is so large that a full table scan - ** seems likely to be faster than using the index. - */ - if int32(*(*TLogEst)(unsafe.Pointer(aLog))) > int32(66) && int32(*(*TLogEst)(unsafe.Pointer(aLog))) <= int32(*(*TLogEst)(unsafe.Pointer(aLog + uintptr(nOut-int32(1))*2))) { - libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 8, 0x100) - } } } @@ -94354,11 +94485,11 @@ func _loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) (r int32) { _, _, _, _ = pStat4, rc, v1, v2 rc = SQLITE_OK if v2 = (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_Stat4)) == uint32(0); v2 { - v1 = _sqlite3FindTable(tls, db, __ccgo_ts+11797, zDb) + v1 = _sqlite3FindTable(tls, db, __ccgo_ts+11822, zDb) pStat4 = v1 } if v2 && v1 != uintptr(0) && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { - rc = _loadStatTbl(tls, db, __ccgo_ts+12023, __ccgo_ts+12092, zDb) + rc = _loadStatTbl(tls, db, __ccgo_ts+12048, __ccgo_ts+12117, zDb) } return rc } @@ -94424,10 +94555,10 @@ func _sqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) (r int32) { /* Load new statistics out of the sqlite_stat1 table */ (*(*TanalysisInfo)(unsafe.Pointer(bp))).Fdb = db (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName - v3 = _sqlite3FindTable(tls, db, __ccgo_ts+11771, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase) + v3 = _sqlite3FindTable(tls, db, __ccgo_ts+11796, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase) pStat1 = v3 if v3 != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { - zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+12144, libc.VaList(bp+24, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase)) + zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+12169, libc.VaList(bp+24, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase)) if zSql == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { @@ -94540,7 +94671,7 @@ func _resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) (r int32) { // ** database iDb attached to handle db. // */ func _sqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) (r int32) { - return libc.BoolInt32(_sqlite3StrICmp(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zName) == 0 || iDb == 0 && _sqlite3StrICmp(tls, __ccgo_ts+6713, zName) == 0) + return libc.BoolInt32(_sqlite3StrICmp(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zName) == 0 || iDb == 0 && _sqlite3StrICmp(tls, __ccgo_ts+6738, zName) == 0) } // C documentation @@ -94592,11 +94723,11 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { ** from sqlite3_deserialize() to close database db->init.iDb and ** reopen it as a MemDB */ *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, __ccgo_ts+4034) + *(*uintptr)(unsafe.Pointer(bp + 32)) = Xsqlite3_vfs_find(tls, __ccgo_ts+4060) if *(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0) { return } - rc = _sqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), __ccgo_ts+12185, db, bp+40, 0, int32(SQLITE_OPEN_MAIN_DB)) + rc = _sqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), __ccgo_ts+12210, db, bp+40, 0, int32(SQLITE_OPEN_MAIN_DB)) if rc == SQLITE_OK { pNewSchema = _sqlite3SchemaGet(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40))) if pNewSchema != 0 { @@ -94627,7 +94758,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { ** * Specified database name already being used. */ if (*Tsqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+int32(2) { - *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12188, libc.VaList(bp+56, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) + *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12213, libc.VaList(bp+56, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error } i = 0 @@ -94636,7 +94767,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { break } if _sqlite3DbIsNamed(tls, db, i, zName) != 0 { - *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12225, libc.VaList(bp+56, zName)) + *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12250, libc.VaList(bp+56, zName)) goto attach_error } goto _1 @@ -94654,7 +94785,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { } libc.Xmemcpy(tls, aNew, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, libc.Uint64FromInt64(32)*libc.Uint64FromInt32(2)) } else { - aNew = _sqlite3DbRealloc(tls, db, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, uint64(uint64(32)*libc.Uint64FromInt32((*Tsqlite3)(unsafe.Pointer(db)).FnDb+libc.Int32FromInt32(1)))) + aNew = _sqlite3DbRealloc(tls, db, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, uint64(32)*libc.Uint64FromInt64(libc.Int64FromInt32(1)+int64((*Tsqlite3)(unsafe.Pointer(db)).FnDb))) if aNew == uintptr(0) { return } @@ -94692,7 +94823,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { (*Tsqlite3)(unsafe.Pointer(db)).FnoSharedCache = uint8(0) if rc == int32(SQLITE_CONSTRAINT) { rc = int32(SQLITE_ERROR) - *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12255, 0) + *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12280, 0) } else { if rc == SQLITE_OK { (*TDb)(unsafe.Pointer(pNew)).FpSchema = _sqlite3SchemaGet(tls, db, (*TDb)(unsafe.Pointer(pNew)).FpBt) @@ -94700,7 +94831,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { rc = int32(SQLITE_NOMEM) } else { if (*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pNew)).FpSchema)).Ffile_format != 0 && libc.Int32FromUint8((*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pNew)).FpSchema)).Fenc) != libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Fenc) { - *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12284, 0) + *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12309, 0) rc = int32(SQLITE_ERROR) } } @@ -94747,7 +94878,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+1635, 0) } else { if *(*uintptr)(unsafe.Pointer(bp + 24)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12352, libc.VaList(bp+56, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 24)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12377, libc.VaList(bp+56, zFile)) } } } @@ -94809,15 +94940,15 @@ func _detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { i++ } if i >= (*Tsqlite3)(unsafe.Pointer(db)).FnDb { - Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12380, libc.VaList(bp+136, zName)) + Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12405, libc.VaList(bp+136, zName)) goto detach_error } if i < int32(2) { - Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12401, libc.VaList(bp+136, zName)) + Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12426, libc.VaList(bp+136, zName)) goto detach_error } if _sqlite3BtreeTxnState(tls, (*TDb)(unsafe.Pointer(pDb)).FpBt) != SQLITE_TXN_NONE || _sqlite3BtreeIsInBackup(tls, (*TDb)(unsafe.Pointer(pDb)).FpBt) != 0 { - Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12427, libc.VaList(bp+136, zName)) + Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12452, libc.VaList(bp+136, zName)) goto detach_error } /* If any TEMP triggers reference the schema being detached, move those @@ -94912,7 +95043,7 @@ func _sqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { var _detach_func = TFuncDef{ FnArg: int16(1), FfuncFlags: uint32(SQLITE_UTF8), - FzName: __ccgo_ts + 12449, + FzName: __ccgo_ts + 12474, } func init() { @@ -94934,7 +95065,7 @@ func _sqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, p var _attach_func = TFuncDef{ FnArg: int16(3), FfuncFlags: uint32(SQLITE_UTF8), - FzName: __ccgo_ts + 12463, + FzName: __ccgo_ts + 12488, } func init() { @@ -94960,7 +95091,7 @@ func _fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) (r int32) { if (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer((*TDbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit1.Fbusy != 0 { (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_NULL) } else { - _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12477, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType)) + _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12502, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType)) return int32(WRC_Abort) } } @@ -94994,7 +95125,7 @@ func _fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) (r int32) { if libc.Int32FromUint8((*TDbFixer)(unsafe.Pointer(pFix)).FbTemp) == 0 && int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x4>>2) == 0 { if int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x10000>>16) == 0 && *(*uintptr)(unsafe.Pointer(pItem + 72)) != uintptr(0) { if iDb != _sqlite3FindDbName(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 72))) { - _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12501, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType, (*TDbFixer)(unsafe.Pointer(pFix)).FpName, *(*uintptr)(unsafe.Pointer(pItem + 72)))) + _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12526, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType, (*TDbFixer)(unsafe.Pointer(pFix)).FpName, *(*uintptr)(unsafe.Pointer(pItem + 72)))) return int32(WRC_Abort) } _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 72))) @@ -95211,7 +95342,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // ** user-supplied authorization function returned an illegal value. // */ func _sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12547, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12572, 0) (*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_ERROR) } @@ -95239,11 +95370,11 @@ func _sqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp } rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3)(unsafe.Pointer(db)).FxAuth})))(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpAuthArg, int32(SQLITE_READ), zTab, zCol, zDb, (*TParse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == int32(SQLITE_DENY) { - z = Xsqlite3_mprintf(tls, __ccgo_ts+12570, libc.VaList(bp+8, zTab, zCol)) + z = Xsqlite3_mprintf(tls, __ccgo_ts+12595, libc.VaList(bp+8, zTab, zCol)) if (*Tsqlite3)(unsafe.Pointer(db)).FnDb > int32(2) || iDb != 0 { - z = Xsqlite3_mprintf(tls, __ccgo_ts+12576, libc.VaList(bp+8, zDb, z)) + z = Xsqlite3_mprintf(tls, __ccgo_ts+12601, libc.VaList(bp+8, zDb, z)) } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12582, libc.VaList(bp+8, z)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12607, libc.VaList(bp+8, z)) (*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_AUTH) } else { if rc != int32(SQLITE_IGNORE) && rc != SQLITE_OK { @@ -95303,7 +95434,7 @@ func _sqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*16))).FzCnName } else { - zCol = __ccgo_ts + 8094 + zCol = __ccgo_ts + 8119 } } if int32(SQLITE_IGNORE) == _sqlite3AuthReadCol(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -95338,7 +95469,7 @@ func _sqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, ** parameters can be either NULL or a string. */ rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3)(unsafe.Pointer(db)).FxAuth})))(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*TParse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == int32(SQLITE_DENY) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12609, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12634, 0) (*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_AUTH) } else { if rc != SQLITE_OK && rc != int32(SQLITE_IGNORE) { @@ -95456,7 +95587,7 @@ func _lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab TPgno, isWriteLoc nBytes = libc.Int32FromUint64(uint64(24) * libc.Uint64FromInt32((*TParse)(unsafe.Pointer(pToplevel)).FnTableLock+libc.Int32FromInt32(1))) (*TParse)(unsafe.Pointer(pToplevel)).FaTableLock = _sqlite3DbReallocOrFree(tls, (*TParse)(unsafe.Pointer(pToplevel)).Fdb, (*TParse)(unsafe.Pointer(pToplevel)).FaTableLock, libc.Uint64FromInt32(nBytes)) if (*TParse)(unsafe.Pointer(pToplevel)).FaTableLock != 0 { - v4 = pToplevel + 156 + v4 = pToplevel + 140 v3 = *(*int32)(unsafe.Pointer(v4)) *(*int32)(unsafe.Pointer(v4))++ p = (*TParse)(unsafe.Pointer(pToplevel)).FaTableLock + uintptr(v3)*24 @@ -95554,7 +95685,9 @@ func _sqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } if v != 0 { if (*TParse)(unsafe.Pointer(pParse)).FbReturning != 0 { - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 208)) + pReturning = (*(*struct { + FpReturning uintptr + })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning if (*TReturning)(unsafe.Pointer(pReturning)).FnRetCol != 0 { _sqlite3VdbeAddOp0(tls, v, int32(OP_FkCheck)) addrRewind = _sqlite3VdbeAddOp1(tls, v, int32(OP_Rewind), (*TReturning)(unsafe.Pointer(pReturning)).FiRetCur) @@ -95632,7 +95765,7 @@ func _sqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { */ if (*TParse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { pEL = (*TParse)(unsafe.Pointer(pParse)).FpConstExpr - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(0), 2, 0x4) i = 0 for { if !(i < (*TExprList)(unsafe.Pointer(pEL)).FnExpr) { @@ -95646,7 +95779,9 @@ func _sqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { } } if (*TParse)(unsafe.Pointer(pParse)).FbReturning != 0 { - pRet = *(*uintptr)(unsafe.Pointer(pParse + 208)) + pRet = (*(*struct { + FpReturning uintptr + })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning if (*TReturning)(unsafe.Pointer(pRet)).FnRetCol != 0 { _sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), (*TReturning)(unsafe.Pointer(pRet)).FiRetCur, (*TReturning)(unsafe.Pointer(pRet)).FnRetCol) } @@ -95759,21 +95894,21 @@ func _sqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp if i >= (*Tsqlite3)(unsafe.Pointer(db)).FnDb { /* No match against the official names. But always match "main" ** to schema 0 as a legacy fallback. */ - if _sqlite3StrICmp(tls, zDatabase, __ccgo_ts+6713) == 0 { + if _sqlite3StrICmp(tls, zDatabase, __ccgo_ts+6738) == 0 { i = 0 } else { return uintptr(0) } } p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32))).FpSchema+8, zName) - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6653, int32(7)) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6678, int32(7)) == 0 { if i == int32(1) { - if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6680+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6699+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6149+7) == 0 { - p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpSchema+8, __ccgo_ts+6661) + if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6705+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6724+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6173+7) == 0 { + p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpSchema+8, __ccgo_ts+6686) } } else { - if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6699+7) == 0 { - p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32))).FpSchema+8, __ccgo_ts+6149) + if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6724+7) == 0 { + p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32))).FpSchema+8, __ccgo_ts+6173) } } } @@ -95803,12 +95938,12 @@ func _sqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp ; i++ } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6653, int32(7)) == 0 { - if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6699+7) == 0 { - p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FpSchema+8, __ccgo_ts+6149) + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6678, int32(7)) == 0 { + if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6724+7) == 0 { + p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FpSchema+8, __ccgo_ts+6173) } else { - if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6680+7) == 0 { - p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpSchema+8, __ccgo_ts+6661) + if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6705+7) == 0 { + p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpSchema+8, __ccgo_ts+6686) } } } @@ -95846,7 +95981,7 @@ func _sqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags Tu32, zName uintpt ** can be an eponymous virtual table. */ if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FprepFlags)&int32(SQLITE_PREPARE_NO_VTAB) == 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 { pMod = _sqlite3HashFind(tls, db+576, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+12624, int32(7)) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+12649, int32(7)) == 0 { pMod = _sqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && _sqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -95856,7 +95991,7 @@ func _sqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags Tu32, zName uintpt if flags&uint32(LOCATE_NOERR) != 0 { return uintptr(0) } - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) } else { if libc.Int32FromUint8((*TTable)(unsafe.Pointer(p)).FeTabType) == int32(TABTYP_VTAB) && libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FprepFlags)&int32(SQLITE_PREPARE_NO_VTAB) != 0 { p = uintptr(0) @@ -95864,15 +95999,15 @@ func _sqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags Tu32, zName uintpt } if p == uintptr(0) { if flags&uint32(LOCATE_VIEW) != 0 { - v1 = __ccgo_ts + 12632 + v1 = __ccgo_ts + 12657 } else { - v1 = __ccgo_ts + 12645 + v1 = __ccgo_ts + 12670 } zMsg = v1 if zDbase != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6917, libc.VaList(bp+8, zMsg, zDbase, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6942, libc.VaList(bp+8, zMsg, zDbase, zName)) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6988, libc.VaList(bp+8, zMsg, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7013, libc.VaList(bp+8, zMsg, zName)) } } else { } @@ -95910,12 +96045,12 @@ func _sqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags Tu32, p uintpt // ** names into the new preferred names, as appropriate. // */ func _sqlite3PreferredTableName(tls *libc.TLS, zName uintptr) (r uintptr) { - if Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6653, int32(7)) == 0 { - if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6149+7) == 0 { - return __ccgo_ts + 6699 + if Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6678, int32(7)) == 0 { + if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6173+7) == 0 { + return __ccgo_ts + 6724 } - if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6661+7) == 0 { - return __ccgo_ts + 6680 + if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6686+7) == 0 { + return __ccgo_ts + 6705 } } return zName @@ -96440,7 +96575,7 @@ func _sqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { var v uintptr _ = v v = _sqlite3GetVdbe(tls, p) - _sqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), __ccgo_ts+6149) + _sqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), __ccgo_ts+6173) _sqlite3VdbeAddOp4Int(tls, v, int32(OP_OpenWrite), 0, int32(SCHEMA_ROOT), iDb, int32(5)) if (*TParse)(unsafe.Pointer(p)).FnTab == 0 { (*TParse)(unsafe.Pointer(p)).FnTab = int32(1) @@ -96472,7 +96607,7 @@ func _sqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) (r int32) { } /* "main" is always an acceptable alias for the primary database ** even if it has been renamed using SQLITE_DBCONFIG_MAINDBNAME. */ - if i == 0 && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+6713, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+6738, zName) { break } goto _1 @@ -96530,13 +96665,13 @@ func _sqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u db = (*TParse)(unsafe.Pointer(pParse)).Fdb if (*TToken)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12659, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12684, 0) return -int32(1) } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = _sqlite3FindDb(tls, db, pName1) if iDb < 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12676, libc.VaList(bp+8, pName1)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12701, libc.VaList(bp+8, pName1)) return -int32(1) } } else { @@ -96584,8 +96719,8 @@ func _sqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType return int32(SQLITE_ERROR) } } else { - if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6653, int32(7)) || _sqlite3ReadOnlyShadowTables(tls, db) != 0 && _sqlite3ShadowTableName(tls, db, zName) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12696, libc.VaList(bp+8, zName)) + if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6678, int32(7)) || _sqlite3ReadOnlyShadowTables(tls, db) != 0 && _sqlite3ShadowTableName(tls, db, zName) != 0 { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12721, libc.VaList(bp+8, zName)) return int32(SQLITE_ERROR) } } @@ -96621,23 +96756,25 @@ func _sqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) (r uintptr) { // ** find the (first) offset of that column in index pIdx. Or return -1 // ** if column iCol is not used in index pIdx. // */ -func _sqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol Ti16) (r Ti16) { +func _sqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol int32) (r int32) { var i int32 - _ = i + var iCol16 Ti16 + _, _ = i, iCol16 + iCol16 = int16(iCol) i = 0 for { if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)) { break } - if int32(iCol) == int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { - return int16(i) + if int32(iCol16) == int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { + return i } goto _1 _1: ; i++ } - return int16(-int32(1)) + return -int32(1) } // C documentation @@ -96757,7 +96894,7 @@ func _sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { var iReg, v1 int32 var v, v2 uintptr _, _, _, _ = iReg, v, v1, v2 - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) iReg = v1 @@ -96800,9 +96937,9 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui /* Special case: Parsing the sqlite_schema or sqlite_temp_schema schema */ iDb = libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb) if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) { - v1 = __ccgo_ts + 6661 + v1 = __ccgo_ts + 6686 } else { - v1 = __ccgo_ts + 6149 + v1 = __ccgo_ts + 6173 } zName = _sqlite3DbStrDup(tls, db, v1) *(*uintptr)(unsafe.Pointer(bp)) = pName1 @@ -96815,7 +96952,7 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && isTemp != 0 && (*TToken)(unsafe.Pointer(pName2)).Fn > uint32(0) && iDb != int32(1) { /* If creating a temp table, the name may not be qualified. Unless ** the database name is "temp" anyway. */ - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12738, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12763, 0) return } if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && isTemp != 0 { @@ -96831,9 +96968,9 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui return } if isView != 0 { - v2 = __ccgo_ts + 10985 + v2 = __ccgo_ts + 11010 } else { - v2 = __ccgo_ts + 9247 + v2 = __ccgo_ts + 9272 } if _sqlite3CheckObjectName(tls, pParse, zName, v2, zName) != 0 { goto begin_table_error @@ -96843,9 +96980,9 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui } zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && isTemp == int32(1) { - v3 = __ccgo_ts + 6661 + v3 = __ccgo_ts + 6686 } else { - v3 = __ccgo_ts + 6149 + v3 = __ccgo_ts + 6173 } if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_INSERT), v3, uintptr(0), zDb) != 0 { goto begin_table_error @@ -96869,11 +97006,11 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui if pTable != 0 { if !(noErr != 0) { if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTable)).FeTabType) == int32(TABTYP_VIEW) { - v4 = __ccgo_ts + 10985 + v4 = __ccgo_ts + 11010 } else { - v4 = __ccgo_ts + 9247 + v4 = __ccgo_ts + 9272 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12779, libc.VaList(bp+16, v4, *(*uintptr)(unsafe.Pointer(bp)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12804, libc.VaList(bp+16, v4, *(*uintptr)(unsafe.Pointer(bp)))) } else { _sqlite3CodeVerifySchema(tls, pParse, iDb) _sqlite3ForceNotReadOnly(tls, pParse) @@ -96881,11 +97018,11 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui goto begin_table_error } if _sqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12800, libc.VaList(bp+16, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12825, libc.VaList(bp+16, zName)) goto begin_table_error } } - pTable = _sqlite3DbMallocZero(tls, db, uint64(104)) + pTable = _sqlite3DbMallocZero(tls, db, uint64(120)) if pTable == uintptr(0) { (*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM) (*TParse)(unsafe.Pointer(pParse)).FnErr++ @@ -96917,19 +97054,29 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui /* If the file format and encoding in the database have not been set, ** set them now. */ - v9 = pParse + 60 + v9 = pParse + 64 *(*int32)(unsafe.Pointer(v9))++ v8 = *(*int32)(unsafe.Pointer(v9)) v7 = v8 - (*TParse)(unsafe.Pointer(pParse)).FregRowid = v7 + (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FregRowid = v7 reg1 = v7 - v12 = pParse + 60 + v12 = pParse + 64 *(*int32)(unsafe.Pointer(v12))++ v11 = *(*int32)(unsafe.Pointer(v12)) v10 = v11 - (*TParse)(unsafe.Pointer(pParse)).FregRoot = v10 + (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FregRoot = v10 reg2 = v10 - v14 = pParse + 60 + v14 = pParse + 64 *(*int32)(unsafe.Pointer(v14))++ v13 = *(*int32)(unsafe.Pointer(v14)) reg3 = v13 @@ -96949,15 +97096,20 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui ** The record created does not contain anything yet. It will be replaced ** by the real entry in code generated at sqlite3EndTable(). ** - ** The rowid for the new entry is left in register pParse->regRowid. - ** The root page number of the new table is left in reg pParse->regRoot. + ** The rowid for the new entry is left in register pParse->u1.cr.regRowid. + ** The root page of the new table is left in reg pParse->u1.cr.regRoot. ** The rowid and root page number values are needed by the code that ** sqlite3EndTable will generate. */ if isView != 0 || isVirtual != 0 { _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, reg2) } else { - (*TParse)(unsafe.Pointer(pParse)).Fu1.FaddrCrTab = _sqlite3VdbeAddOp3(tls, v, int32(OP_CreateBtree), iDb, reg2, int32(BTREE_INTKEY)) + (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FaddrCrTab = _sqlite3VdbeAddOp3(tls, v, int32(OP_CreateBtree), iDb, reg2, int32(BTREE_INTKEY)) } _sqlite3OpenSchemaTable(tls, pParse, iDb) _sqlite3VdbeAddOp2(tls, v, int32(OP_NewRowid), 0, reg1) @@ -96972,7 +97124,7 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui goto begin_table_error begin_table_error: ; - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) _sqlite3DbFree(tls, db, zName) return } @@ -97033,7 +97185,7 @@ func _sqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { _, _, _ = db, pHash, pRet db = (*TParse)(unsafe.Pointer(pParse)).Fdb if (*TParse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12835, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12860, 0) } else { } (*TParse)(unsafe.Pointer(pParse)).FbReturning = uint8(1) @@ -97042,14 +97194,16 @@ func _sqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { _sqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 208)) = pRet + (*(*struct { + FpReturning uintptr + })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning = pRet (*TReturning)(unsafe.Pointer(pRet)).FpParse = pParse (*TReturning)(unsafe.Pointer(pRet)).FpReturnEL = pList _sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_sqlite3DeleteReturning), pRet) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - Xsqlite3_snprintf(tls, int32(40), pRet+196, __ccgo_ts+12869, libc.VaList(bp+8, pParse)) + Xsqlite3_snprintf(tls, int32(40), pRet+196, __ccgo_ts+12894, libc.VaList(bp+8, pParse)) (*TReturning)(unsafe.Pointer(pRet)).FretTrig.FzName = pRet + 196 (*TReturning)(unsafe.Pointer(pRet)).FretTrig.Fop = uint8(TK_RETURNING) (*TReturning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = uint8(TRIGGER_AFTER) @@ -97081,11 +97235,11 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok defer tls.Free(48) *(*TToken)(unsafe.Pointer(bp)) = _sName *(*TToken)(unsafe.Pointer(bp + 16)) = _sType - var aNew, db, p, pCol, z, zType, v1, p4 uintptr + var aNew, db, p, pCol, z, zType, v1, p3 uintptr var affinity int8 - var eType, hName, szEst Tu8 + var eType, h, szEst Tu8 var i int32 - _, _, _, _, _, _, _, _, _, _, _, _, _ = aNew, affinity, db, eType, hName, i, p, pCol, szEst, z, zType, v1, p4 + _, _, _, _, _, _, _, _, _, _, _, _, _ = aNew, affinity, db, eType, h, i, p, pCol, szEst, z, zType, v1, p3 db = (*TParse)(unsafe.Pointer(pParse)).Fdb eType = uint8(COLTYPE_CUSTOM) szEst = uint8(1) @@ -97096,7 +97250,7 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok return } if int32((*TTable)(unsafe.Pointer(p)).FnCol)+int32(1) > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12889, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12914, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName)) return } if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) { @@ -97106,12 +97260,12 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok ** by the parser, we can sometimes end up with a typename that ends ** with "generated always". Check for this case and omit the surplus ** text. */ - if (*(*TToken)(unsafe.Pointer(bp + 16))).Fn >= uint32(16) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 16))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 16))).Fn-libc.Uint32FromInt32(6)), __ccgo_ts+12912, int32(6)) == 0 { + if (*(*TToken)(unsafe.Pointer(bp + 16))).Fn >= uint32(16) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 16))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 16))).Fn-libc.Uint32FromInt32(6)), __ccgo_ts+12937, int32(6)) == 0 { (*(*TToken)(unsafe.Pointer(bp + 16))).Fn -= uint32(6) for (*(*TToken)(unsafe.Pointer(bp + 16))).Fn > uint32(0) && libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*(*TToken)(unsafe.Pointer(bp + 16))).Fz + uintptr((*(*TToken)(unsafe.Pointer(bp + 16))).Fn-uint32(1)))))])&int32(0x01) != 0 { (*(*TToken)(unsafe.Pointer(bp + 16))).Fn-- } - if (*(*TToken)(unsafe.Pointer(bp + 16))).Fn >= uint32(9) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 16))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 16))).Fn-libc.Uint32FromInt32(9)), __ccgo_ts+12919, int32(9)) == 0 { + if (*(*TToken)(unsafe.Pointer(bp + 16))).Fn >= uint32(9) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 16))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 16))).Fn-libc.Uint32FromInt32(9)), __ccgo_ts+12944, int32(9)) == 0 { (*(*TToken)(unsafe.Pointer(bp + 16))).Fn -= uint32(9) for (*(*TToken)(unsafe.Pointer(bp + 16))).Fn > uint32(0) && libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*(*TToken)(unsafe.Pointer(bp + 16))).Fz + uintptr((*(*TToken)(unsafe.Pointer(bp + 16))).Fn-uint32(1)))))])&int32(0x01) != 0 { (*(*TToken)(unsafe.Pointer(bp + 16))).Fn-- @@ -97153,21 +97307,10 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok libc.Xmemcpy(tls, z, (*(*TToken)(unsafe.Pointer(bp))).Fz, uint64((*(*TToken)(unsafe.Pointer(bp))).Fn)) *(*int8)(unsafe.Pointer(z + uintptr((*(*TToken)(unsafe.Pointer(bp))).Fn))) = 0 _sqlite3Dequote(tls, z) - hName = _sqlite3StrIHash(tls, z) - i = 0 - for { - if !(i < int32((*TTable)(unsafe.Pointer(p)).FnCol)) { - break - } - if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(i)*16))).FhName) == libc.Int32FromUint8(hName) && _sqlite3StrICmp(tls, z, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(i)*16))).FzCnName) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12929, libc.VaList(bp+40, z)) - _sqlite3DbFree(tls, db, z) - return - } - goto _3 - _3: - ; - i++ + if (*TTable)(unsafe.Pointer(p)).FnCol != 0 && _sqlite3ColumnIndex(tls, p, z) >= 0 { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12954, libc.VaList(bp+40, z)) + _sqlite3DbFree(tls, db, z) + return } aNew = _sqlite3DbRealloc(tls, db, (*TTable)(unsafe.Pointer(p)).FaCol, libc.Uint64FromInt64(int64((*TTable)(unsafe.Pointer(p)).FnCol)+libc.Int64FromInt32(1))*uint64(16)) if aNew == uintptr(0) { @@ -97178,7 +97321,7 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok pCol = (*TTable)(unsafe.Pointer(p)).FaCol + uintptr((*TTable)(unsafe.Pointer(p)).FnCol)*16 libc.Xmemset(tls, pCol, 0, uint64(16)) (*TColumn)(unsafe.Pointer(pCol)).FzCnName = z - (*TColumn)(unsafe.Pointer(pCol)).FhName = hName + (*TColumn)(unsafe.Pointer(pCol)).FhName = _sqlite3StrIHash(tls, z) if (*(*TToken)(unsafe.Pointer(bp + 16))).Fn == uint32(0) { /* If there is no type specified, columns have the default affinity ** 'BLOB' with a default size of 4 bytes. */ @@ -97191,12 +97334,21 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok *(*int8)(unsafe.Pointer(zType + uintptr((*(*TToken)(unsafe.Pointer(bp + 16))).Fn))) = 0 _sqlite3Dequote(tls, zType) (*TColumn)(unsafe.Pointer(pCol)).Faffinity = _sqlite3AffinityType(tls, zType, pCol) - p4 = pCol + 14 - *(*Tu16)(unsafe.Pointer(p4)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p4))) | libc.Int32FromInt32(COLFLAG_HASTYPE)) + p3 = pCol + 14 + *(*Tu16)(unsafe.Pointer(p3)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p3))) | libc.Int32FromInt32(COLFLAG_HASTYPE)) + } + if int32((*TTable)(unsafe.Pointer(p)).FnCol) <= int32(0xff) { + h = uint8(uint64((*TColumn)(unsafe.Pointer(pCol)).FhName) % uint64(16)) + *(*Tu8)(unsafe.Pointer(p + 104 + uintptr(h))) = libc.Uint8FromInt16((*TTable)(unsafe.Pointer(p)).FnCol) } (*TTable)(unsafe.Pointer(p)).FnCol++ (*TTable)(unsafe.Pointer(p)).FnNVCol++ - (*TParse)(unsafe.Pointer(pParse)).FconstraintName.Fn = uint32(0) + (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FconstraintName.Fn = uint32(0) } // C documentation @@ -97368,10 +97520,10 @@ func _sqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar isInit = libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb) != int32(1)) pCol = (*TTable)(unsafe.Pointer(p)).FaCol + uintptr(int32((*TTable)(unsafe.Pointer(p)).FnCol)-int32(1))*16 if !(_sqlite3ExprIsConstantOrFunction(tls, pExpr, libc.Uint8FromInt32(isInit)) != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12955, libc.VaList(bp+80, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12980, libc.VaList(bp+80, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) } else { if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13000, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13025, 0) } else { libc.Xmemset(tls, bp, 0, uint64(72)) (*(*TExpr)(unsafe.Pointer(bp))).Fop = uint8(TK_SPAN) @@ -97429,7 +97581,7 @@ func _makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { p1 = pCol + 14 *(*Tu16)(unsafe.Pointer(p1)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p1))) | libc.Int32FromInt32(COLFLAG_PRIMKEY)) if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13041, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13066, 0) } } @@ -97457,8 +97609,8 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError bp := tls.Alloc(16) defer tls.Free(16) var i, iCol, nTerm int32 - var pCExpr, pCExpr1, pCol, pTab, zCName uintptr - _, _, _, _, _, _, _, _ = i, iCol, nTerm, pCExpr, pCExpr1, pCol, pTab, zCName + var pCExpr, pCExpr1, pCol, pTab uintptr + _, _, _, _, _, _, _ = i, iCol, nTerm, pCExpr, pCExpr1, pCol, pTab pTab = (*TParse)(unsafe.Pointer(pParse)).FpNewTable pCol = uintptr(0) iCol = -int32(1) @@ -97466,7 +97618,7 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError goto primary_key_exit } if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_HasPrimaryKey) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13093, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13118, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit } *(*Tu32)(unsafe.Pointer(pTab + 48)) |= uint32(TF_HasPrimaryKey) @@ -97485,21 +97637,10 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError pCExpr = _sqlite3ExprSkipCollate(tls, (*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32))).FpExpr) _sqlite3StringToId(tls, pCExpr) if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pCExpr)).Fop) == int32(TK_ID) { - zCName = *(*uintptr)(unsafe.Pointer(pCExpr + 8)) - iCol = 0 - for { - if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } - if _sqlite3StrICmp(tls, zCName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName) == 0 { - pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16 - _makeColumnPartOfPrimaryKey(tls, pParse, pCol) - break - } - goto _2 - _2: - ; - iCol++ + iCol = _sqlite3ColumnIndex(tls, pTab, *(*uintptr)(unsafe.Pointer(pCExpr + 8))) + if iCol >= 0 { + pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16 + _makeColumnPartOfPrimaryKey(tls, pParse, pCol) } } goto _1 @@ -97522,7 +97663,7 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError _sqlite3HasExplicitNulls(tls, pParse, pList) } else { if autoInc != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13134, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13159, 0) } else { _sqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), uintptr(0), sortOrder, 0, uint8(SQLITE_IDXTYPE_PRIMARYKEY)) pList = uintptr(0) @@ -97550,8 +97691,13 @@ func _sqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt db = (*TParse)(unsafe.Pointer(pParse)).Fdb if pTab != 0 && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) == libc.Int32FromInt32(PARSE_MODE_DECLARE_VTAB)) && !(_sqlite3BtreeIsReadonly(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb)*32))).FpBt) != 0) { (*TTable)(unsafe.Pointer(pTab)).FpCheck = _sqlite3ExprListAppend(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FpCheck, pCheckExpr) - if (*TParse)(unsafe.Pointer(pParse)).FconstraintName.Fn != 0 { - _sqlite3ExprListSetName(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FpCheck, pParse+112, int32(1)) + if (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FconstraintName.Fn != 0 { + _sqlite3ExprListSetName(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FpCheck, pParse+256+16, int32(1)) } else { zStart++ for { @@ -97638,17 +97784,17 @@ func _sqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType ui } pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-int32(1))*16 if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) == int32(PARSE_MODE_DECLARE_VTAB) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13190, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13215, 0) goto generated_done } if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FiDflt) > 0 { goto generated_error } if pType != 0 { - if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, __ccgo_ts+13233, (*TToken)(unsafe.Pointer(pType)).Fz, int32(7)) == 0 { + if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, __ccgo_ts+13258, (*TToken)(unsafe.Pointer(pType)).Fz, int32(7)) == 0 { /* no-op */ } else { - if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, __ccgo_ts+13241, (*TToken)(unsafe.Pointer(pType)).Fz, int32(6)) == 0 { + if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, __ccgo_ts+13266, (*TToken)(unsafe.Pointer(pType)).Fz, int32(6)) == 0 { eType = uint8(COLFLAG_STORED) } else { goto generated_error @@ -97680,7 +97826,7 @@ func _sqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType ui goto generated_error generated_error: ; - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13248, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13273, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) goto generated_done generated_done: ; @@ -97821,9 +97967,10 @@ func _identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { // ** from sqliteMalloc() and must be freed by the calling function. // */ func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { - bp := tls.Alloc(32) - defer tls.Free(32) - var i, len1, n, v2 int32 + bp := tls.Alloc(16) + defer tls.Free(16) + var i, len1, v2 int32 + var n Ti64 var pCol, zEnd, zSep, zSep2, zStmt, zType uintptr var _ /* k at bp+0 */ int32 _, _, _, _, _, _, _, _, _, _ = i, len1, n, pCol, zEnd, zSep, zSep2, zStmt, zType, v2 @@ -97834,31 +97981,31 @@ func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { if !(i < int32((*TTable)(unsafe.Pointer(p)).FnCol)) { break } - n += _identLength(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName) + int32(5) + n += int64(_identLength(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName) + int32(5)) goto _1 _1: ; i++ pCol += 16 } - n += _identLength(tls, (*TTable)(unsafe.Pointer(p)).FzName) - if n < int32(50) { + n += int64(_identLength(tls, (*TTable)(unsafe.Pointer(p)).FzName)) + if n < int64(50) { zSep = __ccgo_ts + 1665 - zSep2 = __ccgo_ts + 13279 - zEnd = __ccgo_ts + 5173 + zSep2 = __ccgo_ts + 13304 + zEnd = __ccgo_ts + 5199 } else { - zSep = __ccgo_ts + 13281 - zSep2 = __ccgo_ts + 13285 - zEnd = __ccgo_ts + 13290 + zSep = __ccgo_ts + 13306 + zSep2 = __ccgo_ts + 13310 + zEnd = __ccgo_ts + 13315 } - n += int32(35) + int32(6)*int32((*TTable)(unsafe.Pointer(p)).FnCol) - zStmt = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt32(n)) + n += int64(int32(35) + int32(6)*int32((*TTable)(unsafe.Pointer(p)).FnCol)) + zStmt = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt64(n)) if zStmt == uintptr(0) { _sqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, __ccgo_ts+13293, 0) - *(*int32)(unsafe.Pointer(bp)) = _sqlite3Strlen30(tls, zStmt) + libc.Xmemcpy(tls, zStmt, __ccgo_ts+13318, uint64(13)) + *(*int32)(unsafe.Pointer(bp)) = int32(13) _identPut(tls, zStmt, bp, (*TTable)(unsafe.Pointer(p)).FzName) v2 = *(*int32)(unsafe.Pointer(bp)) *(*int32)(unsafe.Pointer(bp))++ @@ -97869,8 +98016,9 @@ func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { if !(i < int32((*TTable)(unsafe.Pointer(p)).FnCol)) { break } - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), zSep, 0) - *(*int32)(unsafe.Pointer(bp)) += _sqlite3Strlen30(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp)))) + len1 = _sqlite3Strlen30(tls, zSep) + libc.Xmemcpy(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), zSep, libc.Uint64FromInt32(len1)) + *(*int32)(unsafe.Pointer(bp)) += len1 zSep = zSep2 _identPut(tls, zStmt, bp, (*TColumn)(unsafe.Pointer(pCol)).FzCnName) zType = _azType1[int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity)-int32(SQLITE_AFF_BLOB)] @@ -97883,17 +98031,18 @@ func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) { i++ pCol += 16 } - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), __ccgo_ts+3862, libc.VaList(bp+16, zEnd)) + len1 = _sqlite3Strlen30(tls, zEnd) + libc.Xmemcpy(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), zEnd, libc.Uint64FromInt32(len1+int32(1))) return zStmt } var _azType1 = [6]uintptr{ 0: __ccgo_ts + 1665, - 1: __ccgo_ts + 13307, - 2: __ccgo_ts + 13313, - 3: __ccgo_ts + 13318, - 4: __ccgo_ts + 13323, - 5: __ccgo_ts + 13313, + 1: __ccgo_ts + 13332, + 2: __ccgo_ts + 13338, + 3: __ccgo_ts + 13343, + 4: __ccgo_ts + 13348, + 5: __ccgo_ts + 13338, } // C documentation @@ -97902,15 +98051,16 @@ var _azType1 = [6]uintptr{ // ** Resize an Index object to hold N columns total. Return SQLITE_OK // ** on success and SQLITE_NOMEM on an OOM error. // */ -func _resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) (r int32) { - var nByte int32 - var zExtra uintptr - _, _ = nByte, zExtra +func _resizeIndexObject(tls *libc.TLS, pParse uintptr, pIdx uintptr, N int32) (r int32) { + var db, zExtra uintptr + var nByte Tu64 + _, _, _ = db, nByte, zExtra if libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) >= N { return SQLITE_OK } - nByte = libc.Int32FromUint64((libc.Uint64FromInt64(8) + libc.Uint64FromInt64(2) + libc.Uint64FromInt64(2) + libc.Uint64FromInt32(1)) * libc.Uint64FromInt32(N)) - zExtra = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte)) + db = (*TParse)(unsafe.Pointer(pParse)).Fdb + nByte = uint64(libc.Uint64FromInt64(8)+libc.Uint64FromInt64(2)+libc.Uint64FromInt64(2)+libc.Uint64FromInt32(1)) * libc.Uint64FromInt32(N) + zExtra = _sqlite3DbMallocZero(tls, db, nByte) if zExtra == uintptr(0) { return int32(SQLITE_NOMEM) } @@ -97925,7 +98075,7 @@ func _resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) (r int zExtra += uintptr(uint64(2) * libc.Uint64FromInt32(N)) libc.Xmemcpy(tls, zExtra, (*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder, uint64((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)) (*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder = zExtra - (*TIndex)(unsafe.Pointer(pIdx)).FnColumn = libc.Uint16FromInt32(N) + (*TIndex)(unsafe.Pointer(pIdx)).FnColumn = libc.Uint16FromInt32(N) /* See tag-20250221-1 above for proof of safety */ libc.SetBitFieldPtr16Uint32(pIdx+100, libc.Uint32FromInt32(1), 4, 0x10) return SQLITE_OK } @@ -98158,8 +98308,18 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY ** into BTREE_BLOBKEY. */ - if (*TParse)(unsafe.Pointer(pParse)).Fu1.FaddrCrTab != 0 { - _sqlite3VdbeChangeP3(tls, v, (*TParse)(unsafe.Pointer(pParse)).Fu1.FaddrCrTab, int32(BTREE_BLOBKEY)) + if (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FaddrCrTab != 0 { + _sqlite3VdbeChangeP3(tls, v, (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FaddrCrTab, int32(BTREE_BLOBKEY)) } /* Locate the PRIMARY KEY index. Or, if this table was originally ** an INTEGER PRIMARY KEY table, create a new PRIMARY KEY index. @@ -98259,7 +98419,7 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { (*TIndex)(unsafe.Pointer(pIdx)).FnColumn = (*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol goto _6 } - if _resizeIndexObject(tls, db, pIdx, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol)+n) != 0 { + if _resizeIndexObject(tls, pParse, pIdx, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol)+n) != 0 { return } i = 0 @@ -98272,8 +98432,8 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)) = *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)) *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8)) if *(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(i))) != 0 { - /* See ticket https://www.sqlite.org/src/info/bba7b69f9849b5bf */ - libc.SetBitFieldPtr16Uint32(pIdx+100, libc.Uint32FromInt32(1), 10, 0x400) + /* See ticket https://sqlite.org/src/info/bba7b69f9849b5bf */ + libc.SetBitFieldPtr16Uint32(pIdx+100, libc.Uint32FromInt32(1), 9, 0x200) } j++ } @@ -98303,7 +98463,7 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { ; i++ } - if _resizeIndexObject(tls, db, pPk, nPk+nExtra) != 0 { + if _resizeIndexObject(tls, pParse, pPk, nPk+nExtra) != 0 { return } i = 0 @@ -98522,9 +98682,9 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr pCol = (*TTable)(unsafe.Pointer(p)).FaCol + uintptr(ii)*16 if int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) == COLTYPE_CUSTOM { if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_HASTYPE) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13329, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, _sqlite3ColumnType(tls, pCol, __ccgo_ts+1665))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13354, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, _sqlite3ColumnType(tls, pCol, __ccgo_ts+1665))) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13362, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13387, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) } return } else { @@ -98545,11 +98705,11 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr /* Special processing for WITHOUT ROWID Tables */ if tabOpts&uint32(TF_WithoutRowid) != 0 { if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_Autoincrement) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13389, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13414, 0) return } if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_HasPrimaryKey) == uint32(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13439, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13464, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName)) return } *(*Tu32)(unsafe.Pointer(p + 48)) |= libc.Uint32FromInt32(libc.Int32FromInt32(TF_WithoutRowid) | libc.Int32FromInt32(TF_NoVisibleRowid)) @@ -98596,7 +98756,7 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr ii1++ } if nNG == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13471, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13496, 0) return } } @@ -98630,16 +98790,16 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr */ if libc.Int32FromUint8((*TTable)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { /* A regular table */ - zType = __ccgo_ts + 9247 - zType2 = __ccgo_ts + 13515 + zType = __ccgo_ts + 9272 + zType2 = __ccgo_ts + 13540 } else { /* A view */ - zType = __ccgo_ts + 10985 - zType2 = __ccgo_ts + 13521 + zType = __ccgo_ts + 11010 + zType2 = __ccgo_ts + 13546 } /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT ** statement to populate the new table. The root-page number for the - ** new table is in register pParse->regRoot. + ** new table is in register pParse->u1.cr.regRoot. ** ** Once the SELECT has been coded by sqlite3Select(), it is in a ** suitable state to query for the column names and types to be used @@ -98656,24 +98816,29 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*TParse)(unsafe.Pointer(pParse)).FnErr++ return } - v5 = pParse + 56 + v5 = pParse + 60 v4 = *(*int32)(unsafe.Pointer(v5)) *(*int32)(unsafe.Pointer(v5))++ iCsr = v4 - v7 = pParse + 60 + v7 = pParse + 64 *(*int32)(unsafe.Pointer(v7))++ v6 = *(*int32)(unsafe.Pointer(v7)) regYield = v6 - v9 = pParse + 60 + v9 = pParse + 64 *(*int32)(unsafe.Pointer(v9))++ v8 = *(*int32)(unsafe.Pointer(v9)) regRec = v8 - v11 = pParse + 60 + v11 = pParse + 64 *(*int32)(unsafe.Pointer(v11))++ v10 = *(*int32)(unsafe.Pointer(v11)) regRowid = v10 _sqlite3MayAbort(tls, pParse) - _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenWrite), iCsr, (*TParse)(unsafe.Pointer(pParse)).FregRoot, iDb) + _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenWrite), iCsr, (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FregRoot, iDb) _sqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_P2ISREG)) addrTop = _sqlite3VdbeCurrentAddr(tls, v) + int32(1) _sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), regYield, 0, addrTop) @@ -98721,13 +98886,23 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*int8)(unsafe.Pointer((*TToken)(unsafe.Pointer(pEnd2)).Fz))) != int32(';') { n = int32(uint32(n) + (*TToken)(unsafe.Pointer(pEnd2)).Fn) } - zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+13526, libc.VaList(bp+48, zType2, n, (*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+13551, libc.VaList(bp+48, zType2, n, (*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } /* A slot for the record has already been allocated in the ** schema table. We just need to update that slot with all ** the information we've collected. */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+13541, libc.VaList(bp+48, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zType, (*TTable)(unsafe.Pointer(p)).FzName, (*TTable)(unsafe.Pointer(p)).FzName, (*TParse)(unsafe.Pointer(pParse)).FregRoot, zStmt, (*TParse)(unsafe.Pointer(pParse)).FregRowid)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+13566, libc.VaList(bp+48, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zType, (*TTable)(unsafe.Pointer(p)).FzName, (*TTable)(unsafe.Pointer(p)).FzName, (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FregRoot, zStmt, (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FregRowid)) _sqlite3DbFree(tls, db, zStmt) _sqlite3ChangeCookie(tls, pParse, iDb) /* Check to see if we need to create an sqlite_sequence table for @@ -98736,15 +98911,15 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_Autoincrement) != uint32(0) && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) != libc.Int32FromInt32(PARSE_MODE_NORMAL)) { pDb = (*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 if (*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+13639, libc.VaList(bp+48, (*TDb)(unsafe.Pointer(pDb)).FzDbSName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+13664, libc.VaList(bp+48, (*TDb)(unsafe.Pointer(pDb)).FzDbSName)) } } /* Reparse everything to update our internal data structures */ - _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+13681, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName)), uint16(0)) + _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+13706, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(p)).FzName)), uint16(0)) /* Test for cycles in generated columns and illegal expressions ** in CHECK constraints and in DEFAULT clauses. */ if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_HasGenerated) != 0 { - _sqlite3VdbeAddOp4(tls, v, int32(OP_SqlExec), int32(0x0001), 0, 0, _sqlite3MPrintf(tls, db, __ccgo_ts+13715, libc.VaList(bp+48, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTable)(unsafe.Pointer(p)).FzName)), -int32(6)) + _sqlite3VdbeAddOp4(tls, v, int32(OP_SqlExec), int32(0x0001), 0, 0, _sqlite3MPrintf(tls, db, __ccgo_ts+13740, libc.VaList(bp+48, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTable)(unsafe.Pointer(p)).FzName)), -int32(6)) } } /* Add the table to the in-memory representation of the database. @@ -98762,7 +98937,7 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr /* If this is the magic sqlite_sequence table used by autoincrement, ** then record a pointer to this table in the main database structure ** so that INSERT can find the table easily. */ - if libc.Xstrcmp(tls, (*TTable)(unsafe.Pointer(p)).FzName, __ccgo_ts+9769) == 0 { + if libc.Xstrcmp(tls, (*TTable)(unsafe.Pointer(p)).FzName, __ccgo_ts+9794) == 0 { (*TSchema)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } @@ -98795,7 +98970,7 @@ func _sqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui *(*uintptr)(unsafe.Pointer(bp + 112)) = uintptr(0) db = (*TParse)(unsafe.Pointer(pParse)).Fdb if int32((*TParse)(unsafe.Pointer(pParse)).FnVar) > 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13736, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13761, 0) goto create_view_fail } _sqlite3StartTable(tls, pParse, pName1, pName2, isTemp, int32(1), 0, noErr) @@ -98812,7 +98987,7 @@ func _sqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui *(*Tu32)(unsafe.Pointer(p + 48)) |= uint32(TF_NoVisibleRowid) /* Never allow rowid in view */ _sqlite3TwoPartName(tls, pParse, pName1, pName2, bp+112) iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(p)).FpSchema) - _sqlite3FixInit(tls, bp+16, pParse, iDb, __ccgo_ts+10985, *(*uintptr)(unsafe.Pointer(bp + 112))) + _sqlite3FixInit(tls, bp+16, pParse, iDb, __ccgo_ts+11010, *(*uintptr)(unsafe.Pointer(bp + 112))) if _sqlite3FixSelect(tls, bp+16, pSelect) != 0 { goto create_view_fail } @@ -98909,7 +99084,7 @@ func _viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) (r int32 ** SELECT * FROM temp.ex1; */ if int32((*TTable)(unsafe.Pointer(pTable)).FnCol) < 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13772, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13797, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName)) return int32(1) } /* If we get this far, it means we need to compute the table names. @@ -99093,7 +99268,7 @@ func _destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { v = _sqlite3GetVdbe(tls, pParse) r1 = _sqlite3GetTempReg(tls, pParse) if iTable < int32(2) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13802, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13827, 0) } _sqlite3VdbeAddOp3(tls, v, int32(OP_Destroy), iTable, r1, iDb) _sqlite3MayAbort(tls, pParse) @@ -99106,7 +99281,7 @@ func _destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { ** is in register NNN. See grammar rules associated with the TK_REGISTER ** token for additional information. */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+13817, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32))).FzDbSName, iTable, r1, r1)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+13842, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32))).FzDbSName, iTable, r1, r1)) _sqlite3ReleaseTempReg(tls, pParse, r1) } @@ -99189,9 +99364,9 @@ func _sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uin if !(i <= int32(4)) { break } - Xsqlite3_snprintf(tls, int32(24), bp, __ccgo_ts+13884, libc.VaList(bp+32, i)) + Xsqlite3_snprintf(tls, int32(24), bp, __ccgo_ts+13909, libc.VaList(bp+32, i)) if _sqlite3FindTable(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, bp, zDbName) != 0 { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+11874, libc.VaList(bp+32, zDbName, bp, zType, zName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+11899, libc.VaList(bp+32, zDbName, bp, zType, zName)) } goto _1 _1: @@ -99232,7 +99407,7 @@ func _sqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 ** move as a result of the drop (can happen in auto-vacuum mode). */ if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Autoincrement) != 0 { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+13898, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+13923, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName)) } /* Drop all entries in the schema table that refer to the ** table. The program name loops through the schema table and deletes @@ -99241,7 +99416,7 @@ func _sqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 ** created in the temp database that refers to a table in another ** database. */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+13943, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+13968, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == libc.Int32FromInt32(TABTYP_VTAB)) { _destroyTable(tls, pParse, pTab) } @@ -99276,11 +99451,11 @@ func _sqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) (r int32) { // ** Return true if it is not allowed to drop the given table // */ func _tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) (r int32) { - if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6653, int32(7)) == 0 { - if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+3485, int32(4)) == 0 { + if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6678, int32(7)) == 0 { + if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+3511, int32(4)) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+7455, int32(10)) == 0 { + if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+7480, int32(10)) == 0 { return 0 } return int32(1) @@ -99335,9 +99510,9 @@ func _sqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int3 goto exit_drop_table } if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) { - v1 = __ccgo_ts + 6661 + v1 = __ccgo_ts + 6686 } else { - v1 = __ccgo_ts + 6149 + v1 = __ccgo_ts + 6173 } zTab = v1 zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName @@ -99370,18 +99545,18 @@ func _sqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int3 goto exit_drop_table } if _tableMayNotBeDropped(tls, db, pTab) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14010, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14035, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table } /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used ** on a table. */ if isView != 0 && !(libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == libc.Int32FromInt32(TABTYP_VIEW)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14038, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14063, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table } if !(isView != 0) && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14072, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14097, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table } /* Generate code to remove the table from the schema table @@ -99391,7 +99566,7 @@ func _sqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int3 if v != 0 { _sqlite3BeginWriteOperation(tls, pParse, int32(1), iDb) if !(isView != 0) { - _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+11986, (*TTable)(unsafe.Pointer(pTab)).FzName) + _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+12011, (*TTable)(unsafe.Pointer(pTab)).FzName) _sqlite3FkDropTable(tls, pParse, pName, pTab) } _sqlite3CodeDropTable(tls, pParse, pTab, iDb, isView) @@ -99439,19 +99614,19 @@ func _sqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, p goto fk_end } if pToCol != 0 && (*TExprList)(unsafe.Pointer(pToCol)).FnExpr != int32(1) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14104, libc.VaList(bp+8, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(iCol)*16))).FzCnName, pTo)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14129, libc.VaList(bp+8, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(iCol)*16))).FzCnName, pTo)) goto fk_end } nCol = int32(1) } else { if pToCol != 0 && (*TExprList)(unsafe.Pointer(pToCol)).FnExpr != (*TExprList)(unsafe.Pointer(pFromCol)).FnExpr { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14167, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14192, 0) goto fk_end } else { nCol = (*TExprList)(unsafe.Pointer(pFromCol)).FnExpr } } - nByte = libc.Int64FromUint64(uint64(80) + libc.Uint64FromInt32(nCol-libc.Int32FromInt32(1))*uint64(16) + uint64((*TToken)(unsafe.Pointer(pTo)).Fn) + uint64(1)) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+64) + libc.Uint64FromInt32(nCol)*uint64(16) + uint64((*TToken)(unsafe.Pointer(pTo)).Fn) + uint64(1)) if pToCol != 0 { i = 0 for { @@ -99508,7 +99683,7 @@ func _sqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, p j++ } if j >= int32((*TTable)(unsafe.Pointer(p)).FnCol) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14261, libc.VaList(bp+8, (*(*TExprList_item)(unsafe.Pointer(pFromCol + 8 + uintptr(i)*32))).FzEName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14286, libc.VaList(bp+8, (*(*TExprList_item)(unsafe.Pointer(pFromCol + 8 + uintptr(i)*32))).FzEName)) goto fk_end } if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= int32(PARSE_MODE_RENAME) { @@ -99623,11 +99798,11 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP var _ /* iPartIdxLabel at bp+0 */ int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addr1, addr2, db, iDb, iIdx, iSorter, iTab, j2, pKey, pTab, regRecord, tnum, v, v1, v2, v3, v4, v5, v6, v7 pTab = (*TIndex)(unsafe.Pointer(pIndex)).FpTable - v2 = pParse + 56 + v2 = pParse + 60 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ /* The table that is indexed */ iTab = v1 - v4 = pParse + 56 + v4 = pParse + 60 v3 = *(*int32)(unsafe.Pointer(v4)) *(*int32)(unsafe.Pointer(v4))++ /* Btree cursor used for pTab */ iIdx = v3 /* Register holding assembled index record */ @@ -99649,7 +99824,7 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP } pKey = _sqlite3KeyInfoOfIndex(tls, pParse, pIndex) /* Open the sorter cursor if we are to use one. */ - v6 = pParse + 56 + v6 = pParse + 60 v5 = *(*int32)(unsafe.Pointer(v6)) *(*int32)(unsafe.Pointer(v6))++ iSorter = v5 @@ -99694,13 +99869,13 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP addr2 = _sqlite3VdbeCurrentAddr(tls, v) } _sqlite3VdbeAddOp3(tls, v, int32(OP_SorterData), iSorter, regRecord, iIdx) - if !(int32(uint32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x400>>10)) != 0) { + if !(int32(uint32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x200>>9)) != 0) { /* This OP_SeekEnd opcode makes index insert for a REINDEX go much ** faster by avoiding unnecessary seeks. But the optimization does ** not work for UNIQUE constraint indexes on WITHOUT ROWID tables ** with DESC primary keys, since those indexes have there keys in ** a different order from the main table. - ** See ticket: https://www.sqlite.org/src/info/bba7b69f9849b5bf + ** See ticket: https://sqlite.org/src/info/bba7b69f9849b5bf */ _sqlite3VdbeAddOp1(tls, v, int32(OP_SeekEnd), iIdx) } @@ -99723,23 +99898,23 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP // ** of 8-byte aligned space after the Index object and return a // ** pointer to this extra space in *ppExtra. // */ -func _sqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol Ti16, nExtra int32, ppExtra uintptr) (r uintptr) { - var nByte int32 +func _sqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol int32, nExtra int32, ppExtra uintptr) (r uintptr) { + var nByte Ti64 var p, pExtra uintptr - _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */ - nByte = libc.Int32FromUint64((libc.Uint64FromInt64(160)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7)) + (uint64(8)*libc.Uint64FromInt16(nCol)+uint64(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7)) + (uint64(2)*libc.Uint64FromInt32(int32(nCol)+libc.Int32FromInt32(1))+uint64(2)*libc.Uint64FromInt16(nCol)+uint64(1)*libc.Uint64FromInt16(nCol)+uint64(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))) /* Index.aSortOrder */ - p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte+nExtra)) + _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */ + nByte = libc.Int64FromUint64((libc.Uint64FromInt64(160)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7)) + (uint64(8)*libc.Uint64FromInt32(nCol)+uint64(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7)) + (uint64(2)*libc.Uint64FromInt32(nCol+libc.Int32FromInt32(1))+uint64(2)*libc.Uint64FromInt32(nCol)+uint64(1)*libc.Uint64FromInt32(nCol)+uint64(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))) /* Index.aSortOrder */ + p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte+int64(nExtra))) if p != 0 { pExtra = p + uintptr((libc.Uint64FromInt64(160)+libc.Uint64FromInt32(7))&libc.Uint64FromInt32(^libc.Int32FromInt32(7))) (*TIndex)(unsafe.Pointer(p)).FazColl = pExtra - pExtra += uintptr((libc.Uint64FromInt64(8)*libc.Uint64FromInt16(nCol) + libc.Uint64FromInt32(7)) & libc.Uint64FromInt32(^libc.Int32FromInt32(7))) + pExtra += uintptr((libc.Uint64FromInt64(8)*libc.Uint64FromInt32(nCol) + libc.Uint64FromInt32(7)) & libc.Uint64FromInt32(^libc.Int32FromInt32(7))) (*TIndex)(unsafe.Pointer(p)).FaiRowLogEst = pExtra - pExtra += uintptr(uint64(2) * libc.Uint64FromInt32(int32(nCol)+libc.Int32FromInt32(1))) + pExtra += uintptr(uint64(2) * libc.Uint64FromInt32(nCol+libc.Int32FromInt32(1))) (*TIndex)(unsafe.Pointer(p)).FaiColumn = pExtra - pExtra += uintptr(uint64(2) * libc.Uint64FromInt16(nCol)) + pExtra += uintptr(uint64(2) * libc.Uint64FromInt32(nCol)) (*TIndex)(unsafe.Pointer(p)).FaSortOrder = pExtra - (*TIndex)(unsafe.Pointer(p)).FnColumn = libc.Uint16FromInt16(nCol) - (*TIndex)(unsafe.Pointer(p)).FnKeyCol = libc.Uint16FromInt32(int32(nCol) - int32(1)) + (*TIndex)(unsafe.Pointer(p)).FnColumn = libc.Uint16FromInt32(nCol) + (*TIndex)(unsafe.Pointer(p)).FnKeyCol = libc.Uint16FromInt32(nCol - libc.Int32FromInt32(1)) *(*uintptr)(unsafe.Pointer(ppExtra)) = p + uintptr(nByte) } return p @@ -99768,11 +99943,11 @@ func _sqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) (r i if int32(uint32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 16 + 4))&0x20>>5)) != 0 { sf = (*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32))).Ffg.FsortFlags if libc.Int32FromUint8(sf) == 0 || libc.Int32FromUint8(sf) == int32(3) { - v2 = __ccgo_ts + 14307 + v2 = __ccgo_ts + 14332 } else { - v2 = __ccgo_ts + 14313 + v2 = __ccgo_ts + 14338 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14318, libc.VaList(bp+8, v2)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14343, libc.VaList(bp+8, v2)) return int32(1) } goto _1 @@ -99850,7 +100025,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u iDb = int32(1) } } - _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+14346, *(*uintptr)(unsafe.Pointer(bp + 96))) + _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+14371, *(*uintptr)(unsafe.Pointer(bp + 96))) if _sqlite3FixSrcList(tls, bp, pTblName) != 0 { /* Because the parser constructs pTblName from a single identifier, ** sqlite3FixSrcList can never fail. */ @@ -99860,7 +100035,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u goto exit_create_index } if iDb == int32(1) && (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FpSchema != (*TTable)(unsafe.Pointer(pTab)).FpSchema { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14352, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14377, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index } if !((*TTable)(unsafe.Pointer(pTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) { @@ -99874,16 +100049,16 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema) } pDb = (*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 - if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6653, int32(7)) == 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 && pTblName != uintptr(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14402, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab)).FzName)) + if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6678, int32(7)) == 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 && pTblName != uintptr(0) { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14427, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14430, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14455, 0) goto exit_create_index } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14455, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14480, 0) goto exit_create_index } /* @@ -99904,19 +100079,19 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if zName == uintptr(0) { goto exit_create_index } - if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+14346, (*TTable)(unsafe.Pointer(pTab)).FzName) { + if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+14371, (*TTable)(unsafe.Pointer(pTab)).FzName) { goto exit_create_index } if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) { if !((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0) { if _sqlite3FindTable(tls, db, zName, (*TDb)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14489, libc.VaList(bp+136, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14514, libc.VaList(bp+136, zName)) goto exit_create_index } } if _sqlite3FindIndex(tls, db, zName, (*TDb)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0) { if !(ifNotExist != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14523, libc.VaList(bp+136, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14548, libc.VaList(bp+136, zName)) } else { _sqlite3CodeVerifySchema(tls, pParse, iDb) _sqlite3ForceNotReadOnly(tls, pParse) @@ -99937,7 +100112,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u pLoop = (*TIndex)(unsafe.Pointer(pLoop)).FpNext n++ } - zName = _sqlite3MPrintf(tls, db, __ccgo_ts+14547, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab)).FzName, n)) + zName = _sqlite3MPrintf(tls, db, __ccgo_ts+14572, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab)).FzName, n)) if zName == uintptr(0) { goto exit_create_index } @@ -99955,9 +100130,9 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) { zDb = (*TDb)(unsafe.Pointer(pDb)).FzDbSName if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) { - v2 = __ccgo_ts + 6661 + v2 = __ccgo_ts + 6686 } else { - v2 = __ccgo_ts + 6149 + v2 = __ccgo_ts + 6173 } if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_INSERT), v2, uintptr(0), zDb) != 0 { goto exit_create_index @@ -99985,7 +100160,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } _sqlite3ExprListSetSortOrder(tls, pList, sortOrder, -int32(1)) } else { - _sqlite3ExprListCheckLength(tls, pParse, pList, __ccgo_ts+14346) + _sqlite3ExprListCheckLength(tls, pParse, pList, __ccgo_ts+14371) if (*TParse)(unsafe.Pointer(pParse)).FnErr != 0 { goto exit_create_index } @@ -100017,7 +100192,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u v5 = int32(1) } nExtraCol = v5 - pIndex = _sqlite3AllocateIndexObject(tls, db, int16((*TExprList)(unsafe.Pointer(pList)).FnExpr+nExtraCol), nName+nExtra+int32(1), bp+104) + pIndex = _sqlite3AllocateIndexObject(tls, db, (*TExprList)(unsafe.Pointer(pList)).FnExpr+nExtraCol, nName+nExtra+int32(1), bp+104) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { goto exit_create_index } @@ -100069,7 +100244,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u pCExpr = _sqlite3ExprSkipCollate(tls, (*TExprList_item)(unsafe.Pointer(pListItem)).FpExpr) if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pCExpr)).Fop) != int32(TK_COLUMN) { if pTab == (*TParse)(unsafe.Pointer(pParse)).FpNewTable { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14570, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14595, 0) goto exit_create_index } if (*TIndex)(unsafe.Pointer(pIndex)).FaColExpr == uintptr(0) { @@ -100079,19 +100254,19 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u j = -int32(2) *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-libc.Int32FromInt32(2)) libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(0), 3, 0x8) - libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 13, 0x2000) + libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 12, 0x1000) } else { j = int32((*TExpr)(unsafe.Pointer(pCExpr)).FiColumn) if j < 0 { j = int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) - libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 11, 0x800) + libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 10, 0x400) } else { if int32(uint32(*(*uint8)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16 + 8))&0xf>>0)) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(0), 3, 0x8) } if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FcolFlags)&int32(COLFLAG_VIRTUAL) != 0 { + libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 11, 0x800) libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 12, 0x1000) - libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(1), 13, 0x2000) } } *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(j) @@ -100169,7 +100344,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { goto _8 } - if int32(_sqlite3TableColumnToIndex(tls, pIndex, int16(j))) >= 0 { + if _sqlite3TableColumnToIndex(tls, pIndex, j) >= 0 { goto _8 } libc.SetBitFieldPtr16Uint32(pIndex+100, libc.Uint32FromInt32(0), 5, 0x20) @@ -100217,7 +100392,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u ** explicitly specified behavior for the index. */ if !(libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx)).FonError) == int32(OE_Default) || libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIndex)).FonError) == int32(OE_Default)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14631, libc.VaList(bp+136, 0)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14656, libc.VaList(bp+136, 0)) } if libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx)).FonError) == int32(OE_Default) { (*TIndex)(unsafe.Pointer(pIdx)).FonError = (*TIndex)(unsafe.Pointer(pIndex)).FonError @@ -100247,8 +100422,8 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if pTblName != uintptr(0) { (*TIndex)(unsafe.Pointer(pIndex)).Ftnum = (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FnewTnum if _sqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14673, 0) - (*TParse)(unsafe.Pointer(pParse)).Frc = _sqlite3CorruptError(tls, int32(126499)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14698, 0) + (*TParse)(unsafe.Pointer(pParse)).Frc = _sqlite3CorruptError(tls, int32(127335)) goto exit_create_index } } @@ -100261,7 +100436,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u *(*Tu32)(unsafe.Pointer(db + 44)) |= uint32(DBFLAG_SchemaChange) } else { if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) || pTblName != uintptr(0) { - v12 = pParse + 60 + v12 = pParse + 64 *(*int32)(unsafe.Pointer(v12))++ v11 = *(*int32)(unsafe.Pointer(v12)) iMem = v11 @@ -100290,9 +100465,9 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if onError == OE_None { v13 = __ccgo_ts + 1665 } else { - v13 = __ccgo_ts + 14690 + v13 = __ccgo_ts + 14715 } - zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+14698, libc.VaList(bp+136, v13, n1, (*TToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fz)) + zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+14723, libc.VaList(bp+136, v13, n1, (*TToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fz)) } else { /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */ /* zStmt = sqlite3MPrintf(""); */ @@ -100300,7 +100475,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } /* Add an entry in sqlite_schema for this index */ - _sqlite3NestedParse(tls, pParse, __ccgo_ts+14718, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, iMem, zStmt)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+14743, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, iMem, zStmt)) _sqlite3DbFree(tls, db, zStmt) /* Fill the index with data and reparse the schema. Code an OP_Expire ** to invalidate all pre-compiled statements. @@ -100308,7 +100483,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if pTblName != 0 { _sqlite3RefillIndex(tls, pParse, pIndex, iMem) _sqlite3ChangeCookie(tls, pParse, iDb) - _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+14777, libc.VaList(bp+136, (*TIndex)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+14802, libc.VaList(bp+136, (*TIndex)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) _sqlite3VdbeAddOp2(tls, v, int32(OP_Expire), 0, int32(1)) } _sqlite3VdbeJumpHere(tls, v, libc.Int32FromUint32((*TIndex)(unsafe.Pointer(pIndex)).Ftnum)) @@ -100471,16 +100646,16 @@ func _sqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists in pIndex = _sqlite3FindIndex(tls, db, (*(*TSrcItem)(unsafe.Pointer(pName + 8))).FzName, *(*uintptr)(unsafe.Pointer(pName + 8 + 72))) if pIndex == uintptr(0) { if !(ifExists != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14804, libc.VaList(bp+8, pName+8)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14829, libc.VaList(bp+8, pName+8)) } else { _sqlite3CodeVerifyNamedSchema(tls, pParse, *(*uintptr)(unsafe.Pointer(pName + 8 + 72))) _sqlite3ForceNotReadOnly(tls, pParse) } - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) goto exit_drop_index } if int32(uint32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x3>>0)) != SQLITE_IDXTYPE_APPDEF { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14822, libc.VaList(bp+8, 0)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14847, libc.VaList(bp+8, 0)) goto exit_drop_index } iDb = _sqlite3SchemaToIndex(tls, db, (*TIndex)(unsafe.Pointer(pIndex)).FpSchema) @@ -100488,9 +100663,9 @@ func _sqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists in pTab = (*TIndex)(unsafe.Pointer(pIndex)).FpTable zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) { - v1 = __ccgo_ts + 6661 + v1 = __ccgo_ts + 6686 } else { - v1 = __ccgo_ts + 6149 + v1 = __ccgo_ts + 6173 } zTab = v1 if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_DELETE), zTab, uintptr(0), zDb) != 0 { @@ -100506,8 +100681,8 @@ func _sqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists in v = _sqlite3GetVdbe(tls, pParse) if v != 0 { _sqlite3BeginWriteOperation(tls, pParse, int32(1), iDb) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+14895, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName)) - _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+11982, (*TIndex)(unsafe.Pointer(pIndex)).FzName) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+14920, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName)) + _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+12007, (*TIndex)(unsafe.Pointer(pIndex)).FzName) _sqlite3ChangeCookie(tls, pParse, iDb) _destroyRootPage(tls, pParse, libc.Int32FromUint32((*TIndex)(unsafe.Pointer(pIndex)).Ftnum), iDb) _sqlite3VdbeAddOp4(tls, v, int32(OP_DropIndex), iDb, 0, 0, (*TIndex)(unsafe.Pointer(pIndex)).FzName, 0) @@ -100580,12 +100755,12 @@ func _sqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u _, _, _, _, _ = db, i, pNew, v1, v2 db = (*TParse)(unsafe.Pointer(pParse)).Fdb if pList == uintptr(0) { - pList = _sqlite3DbMallocZero(tls, db, uint64(16)) + pList = _sqlite3DbMallocZero(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(8))) if pList == uintptr(0) { return uintptr(0) } } else { - pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint64(16)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(pList)).FnId)*uint64(8))) + pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32((*TIdList)(unsafe.Pointer(pList)).FnId+libc.Int32FromInt32(1))*libc.Uint64FromInt64(8))) if pNew == uintptr(0) { _sqlite3IdListDelete(tls, db, pList) return uintptr(0) @@ -100697,13 +100872,13 @@ func _sqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra nAlloc = int64(2)*int64((*TSrcList)(unsafe.Pointer(pSrc)).FnSrc) + int64(nExtra) db = (*TParse)(unsafe.Pointer(pParse)).Fdb if (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= int32(SQLITE_MAX_SRCLIST) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14955, libc.VaList(bp+8, int32(SQLITE_MAX_SRCLIST))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14980, libc.VaList(bp+8, int32(SQLITE_MAX_SRCLIST))) return uintptr(0) } if nAlloc > int64(SQLITE_MAX_SRCLIST) { nAlloc = int64(SQLITE_MAX_SRCLIST) } - pNew = _sqlite3DbRealloc(tls, db, pSrc, uint64(88)+libc.Uint64FromInt64(nAlloc-libc.Int64FromInt32(1))*uint64(80)) + pNew = _sqlite3DbRealloc(tls, db, pSrc, uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt64(nAlloc)*libc.Uint64FromInt64(80)) if pNew == uintptr(0) { return uintptr(0) } @@ -100784,7 +100959,7 @@ func _sqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable /* Cannot have C without B */ db = (*TParse)(unsafe.Pointer(pParse)).Fdb if pList == uintptr(0) { - pList = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(88)) + pList = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(80))) if pList == uintptr(0) { return uintptr(0) } @@ -100834,7 +101009,7 @@ func _sqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) if (*TSrcItem)(unsafe.Pointer(pItem)).FiCursor >= 0 { goto _1 } - v3 = pParse + 56 + v3 = pParse + 60 v2 = *(*int32)(unsafe.Pointer(v3)) *(*int32)(unsafe.Pointer(v3))++ (*TSrcItem)(unsafe.Pointer(pItem)).FiCursor = v2 @@ -101005,11 +101180,11 @@ func _sqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa db = (*TParse)(unsafe.Pointer(pParse)).Fdb if !(p != 0) && pOnUsing != uintptr(0) && ((*TOnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*TOnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0) { if (*TOnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 { - v1 = __ccgo_ts + 14991 + v1 = __ccgo_ts + 15016 } else { - v1 = __ccgo_ts + 14994 + v1 = __ccgo_ts + 15019 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15000, libc.VaList(bp+8, v1)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15025, libc.VaList(bp+8, v1)) goto append_from_error } p = _sqlite3SrcListAppend(tls, pParse, p, pTable, pDatabase) @@ -101208,7 +101383,7 @@ func _sqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { var eTxnType, i int32 _, _, _, _, _ = db, eTxnType, i, pBt, v db = (*TParse)(unsafe.Pointer(pParse)).Fdb - if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_TRANSACTION), __ccgo_ts+15036, uintptr(0), uintptr(0)) != 0 { + if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_TRANSACTION), __ccgo_ts+15061, uintptr(0), uintptr(0)) != 0 { return } v = _sqlite3GetVdbe(tls, pParse) @@ -101255,9 +101430,9 @@ func _sqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { _, _, _ = isRollback, v, v1 isRollback = libc.BoolInt32(eType == int32(TK_ROLLBACK)) if isRollback != 0 { - v1 = __ccgo_ts + 15042 + v1 = __ccgo_ts + 15067 } else { - v1 = __ccgo_ts + 15051 + v1 = __ccgo_ts + 15076 } if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_TRANSACTION), v1, uintptr(0), uintptr(0)) != 0 { return @@ -101289,9 +101464,9 @@ func _sqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } var _az = [3]uintptr{ - 0: __ccgo_ts + 15036, - 1: __ccgo_ts + 15058, - 2: __ccgo_ts + 15042, + 0: __ccgo_ts + 15061, + 1: __ccgo_ts + 15083, + 2: __ccgo_ts + 15067, } // C documentation @@ -101311,7 +101486,7 @@ func _sqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) (r int32) { if (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpBt == uintptr(0) && !((*TParse)(unsafe.Pointer(pParse)).Fexplain != 0) { rc = _sqlite3BtreeOpen(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, _flags) if rc != SQLITE_OK { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15066, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15091, 0) (*TParse)(unsafe.Pointer(pParse)).Frc = rc return int32(1) } @@ -101336,7 +101511,7 @@ var _flags = libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQ // */ func _sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { if libc.BoolInt32((*TParse)(unsafe.Pointer(pToplevel)).FcookieMask&(libc.Uint32FromInt32(1)<<iDb) != uint32(0)) == 0 { - *(*TyDbMask)(unsafe.Pointer(pToplevel + 132)) |= libc.Uint32FromInt32(1) << iDb + *(*TyDbMask)(unsafe.Pointer(pToplevel + 124)) |= libc.Uint32FromInt32(1) << iDb if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) { _sqlite3OpenTempDatabase(tls, pToplevel) } @@ -101406,7 +101581,7 @@ func _sqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int } pToplevel = v1 _sqlite3CodeVerifySchemaAtToplevel(tls, pToplevel, iDb) - *(*TyDbMask)(unsafe.Pointer(pToplevel + 128)) |= libc.Uint32FromInt32(1) << iDb + *(*TyDbMask)(unsafe.Pointer(pToplevel + 120)) |= libc.Uint32FromInt32(1) << iDb p2 = pToplevel + 32 *(*Tu8)(unsafe.Pointer(p2)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p2))) | setStatement) } @@ -101495,7 +101670,7 @@ func _sqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx pTab = (*TIndex)(unsafe.Pointer(pIdx)).FpTable _sqlite3StrAccumInit(tls, bp, (*TParse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 136))) if (*TIndex)(unsafe.Pointer(pIdx)).FaColExpr != 0 { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+15136, libc.VaList(bp+40, (*TIndex)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+15161, libc.VaList(bp+40, (*TIndex)(unsafe.Pointer(pIdx)).FzName)) } else { j = 0 for { @@ -101504,10 +101679,10 @@ func _sqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx } zCol = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)))*16))).FzCnName if j != 0 { - Xsqlite3_str_append(tls, bp, __ccgo_ts+15147, int32(2)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+15172, int32(2)) } Xsqlite3_str_appendall(tls, bp, (*TTable)(unsafe.Pointer(pTab)).FzName) - Xsqlite3_str_append(tls, bp, __ccgo_ts+1678, int32(1)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+1704, int32(1)) Xsqlite3_str_appendall(tls, bp, zCol) goto _1 _1: @@ -101536,10 +101711,10 @@ func _sqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab var zMsg uintptr _, _ = rc, zMsg if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+12570, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*16))).FzCnName)) + zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+12595, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*16))).FzCnName)) rc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(6)<<libc.Int32FromInt32(8) } else { - zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+15150, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+15175, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) rc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(10)<<libc.Int32FromInt32(8) } _sqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-libc.Int32FromInt32(6)), uint8(P5_ConstraintUnique)) @@ -101714,7 +101889,7 @@ func _sqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp _sqlite3RefillIndex(tls, pParse, pIndex, -int32(1)) return } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15159, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15184, 0) } // C documentation @@ -101759,7 +101934,7 @@ func _sqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) (r uint i++ } if (*TParse)(unsafe.Pointer(pParse)).FnErr != 0 { - if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x200>>9)) == 0 { + if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x100>>8)) == 0 { /* Deactivate the index because it contains an unknown collating ** sequence. The only way to reactive the index is to reload the ** schema. Adding the missing collating sequence later does not @@ -101767,7 +101942,7 @@ func _sqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) (r uint ** the missing index using the collation-needed callback. For ** simplicity, SQLite will not give the application a second chance. */ - libc.SetBitFieldPtr16Uint32(pIdx+100, libc.Uint32FromInt32(1), 9, 0x200) + libc.SetBitFieldPtr16Uint32(pIdx+100, libc.Uint32FromInt32(1), 8, 0x100) (*TParse)(unsafe.Pointer(pParse)).Frc = libc.Int32FromInt32(SQLITE_ERROR) | libc.Int32FromInt32(2)<<libc.Int32FromInt32(8) } _sqlite3KeyInfoUnref(tls, pKey) @@ -101834,8 +102009,7 @@ func _sqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) defer tls.Free(16) var db, pNew, zName, v3 uintptr var i, v2 int32 - var nByte Tsqlite3_int64 - _, _, _, _, _, _, _ = db, i, nByte, pNew, zName, v2, v3 + _, _, _, _, _, _ = db, i, pNew, zName, v2, v3 db = (*TParse)(unsafe.Pointer(pParse)).Fdb if pCte == uintptr(0) { return pWith @@ -101850,7 +102024,7 @@ func _sqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) break } if _sqlite3StrICmp(tls, zName, (*(*TCte)(unsafe.Pointer(pWith + 16 + uintptr(i)*48))).FzName) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15205, libc.VaList(bp+8, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15230, libc.VaList(bp+8, zName)) } goto _1 _1: @@ -101859,10 +102033,9 @@ func _sqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } } if pWith != 0 { - nByte = libc.Int64FromUint64(uint64(64) + uint64(48)*libc.Uint64FromInt32((*TWith)(unsafe.Pointer(pWith)).FnCte)) - pNew = _sqlite3DbRealloc(tls, db, pWith, libc.Uint64FromInt64(nByte)) + pNew = _sqlite3DbRealloc(tls, db, pWith, uint64(uint64(libc.UintptrFromInt32(0)+16)+libc.Uint64FromInt32((*TWith)(unsafe.Pointer(pWith)).FnCte+libc.Int32FromInt32(1))*libc.Uint64FromInt64(48))) } else { - pNew = _sqlite3DbMallocZero(tls, db, uint64(64)) + pNew = _sqlite3DbMallocZero(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+16)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(48))) } if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { _sqlite3CteDelete(tls, db, pCte) @@ -102149,7 +102322,7 @@ func _sqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc Tu8, pColl uintptr, z p = uintptr(0) } if p == uintptr(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15235, libc.VaList(bp+8, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15260, libc.VaList(bp+8, zName)) (*TParse)(unsafe.Pointer(pParse)).Frc = libc.Int32FromInt32(SQLITE_ERROR) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8) } return p @@ -102615,7 +102788,7 @@ func _vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int32) { FazArg uintptr Fp uintptr })(unsafe.Pointer(pTab + 64))).Fp)).FeVtabRisk) > libc.BoolInt32((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15266, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15291, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) } return 0 } @@ -102649,11 +102822,11 @@ func _sqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger ui bp := tls.Alloc(16) defer tls.Free(16) if _tabIsReadOnly(tls, pParse, pTab) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15299, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15324, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) return int32(1) } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) && (pTrigger == uintptr(0) || (*TTrigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 && (*TTrigger)(unsafe.Pointer(pTrigger)).FpNext == uintptr(0)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15328, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15353, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) return int32(1) } return 0 @@ -102757,7 +102930,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere } /* Assign cursor numbers to the table and all its indices. */ - v3 = pParse + 56 + v3 = pParse + 60 v2 = *(*int32)(unsafe.Pointer(v3)) *(*int32)(unsafe.Pointer(v3))++ v1 = v2 @@ -102814,7 +102987,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere ** we are counting rows. */ if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32)) != uint64(0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) && !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) { - v7 = pParse + 60 + v7 = pParse + 64 *(*int32)(unsafe.Pointer(v7))++ v6 = *(*int32)(unsafe.Pointer(v7)) memCnt = v6 @@ -102875,7 +103048,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) { /* For a rowid table, initialize the RowSet to an empty set */ pPk = uintptr(0) - v13 = pParse + 60 + v13 = pParse + 64 *(*int32)(unsafe.Pointer(v13))++ v12 = *(*int32)(unsafe.Pointer(v13)) iRowSet = v12 @@ -102886,8 +103059,8 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere pPk = _sqlite3PrimaryKeyIndex(tls, pTab) nPk = libc.Int16FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) iPk = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(nPk) - v15 = pParse + 56 + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(nPk) + v15 = pParse + 60 v14 = *(*int32)(unsafe.Pointer(v15)) *(*int32)(unsafe.Pointer(v15))++ iEphCur = v14 @@ -102932,7 +103105,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere } iKey = iPk } else { - v18 = pParse + 60 + v18 = pParse + 64 *(*int32)(unsafe.Pointer(v18))++ v17 = *(*int32)(unsafe.Pointer(v18)) iKey = v17 @@ -102963,7 +103136,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere } else { if pPk != 0 { /* Add the PK key for this row to the temporary table */ - v20 = pParse + 60 + v20 = pParse + 64 *(*int32)(unsafe.Pointer(v20))++ v19 = *(*int32)(unsafe.Pointer(v20)) iKey = v19 @@ -103056,7 +103229,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere ** invoke the callback function. */ if memCnt != 0 { - _sqlite3CodeChangeCount(tls, v, memCnt, __ccgo_ts+15366) + _sqlite3CodeChangeCount(tls, v, memCnt, __ccgo_ts+15391) } goto delete_from_cleanup delete_from_cleanup: @@ -103147,7 +103320,7 @@ func _sqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri mask = _sqlite3TriggerColmask(tls, pParse, pTrigger, uintptr(0), 0, libc.Int32FromInt32(TRIGGER_BEFORE)|libc.Int32FromInt32(TRIGGER_AFTER), pTab, libc.Int32FromUint8(onconf)) mask |= _sqlite3FkOldmask(tls, pParse, pTab) iOld = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(1) + int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(1) + int32((*TTable)(unsafe.Pointer(pTab)).FnCol) /* Populate the OLD.* pseudo-table register array. These values will be ** used by any BEFORE and AFTER triggers that exist. */ _sqlite3VdbeAddOp2(tls, v, int32(OP_Copy), iPk, iOld) @@ -103204,7 +103377,7 @@ func _sqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri v3 = 0 } _sqlite3VdbeAddOp2(tls, v, int32(OP_Delete), iDataCur, v3) - if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+11771) { + if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+11796) { _sqlite3VdbeAppendP4(tls, v, pTab, -int32(5)) } if libc.Int32FromUint8(eMode) != ONEPASS_OFF { @@ -103508,10 +103681,10 @@ func _typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { } var _azType2 = [5]uintptr{ - 0: __ccgo_ts + 6389, - 1: __ccgo_ts + 6384, - 2: __ccgo_ts + 8386, - 3: __ccgo_ts + 8381, + 0: __ccgo_ts + 6414, + 1: __ccgo_ts + 6409, + 2: __ccgo_ts + 8411, + 3: __ccgo_ts + 8406, 4: __ccgo_ts + 1651, } @@ -103626,7 +103799,7 @@ func _absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* IMP: R-31676-45509 If X is the integer -9223372036854775808 ** then abs(X) throws an integer overflow error since there is no ** equivalent positive 64-bit two complement value. */ - Xsqlite3_result_error(tls, context, __ccgo_ts+15379, -int32(1)) + Xsqlite3_result_error(tls, context, __ccgo_ts+15404, -int32(1)) return } iVal = -iVal @@ -103784,9 +103957,6 @@ func _substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var p1, p2, v6 Ti64 var z, z2, v2, v3, v5 uintptr _, _, _, _, _, _, _, _, _, _ = len1, p0type, p1, p2, z, z2, v2, v3, v5, v6 - if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == int32(SQLITE_NULL) || argc == int32(3) && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) == int32(SQLITE_NULL) { - return - } p0type = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) p1 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if p0type == int32(SQLITE_BLOB) { @@ -103823,9 +103993,17 @@ func _substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if argc == int32(3) { p2 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) + if p2 == 0 && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) == int32(SQLITE_NULL) { + return + } } else { p2 = int64(*(*int32)(unsafe.Pointer(Xsqlite3_context_db_handle(tls, context) + 136))) } + if p1 == 0 { + if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == int32(SQLITE_NULL) { + return + } + } if p1 < 0 { p1 += int64(len1) if p1 < 0 { @@ -103941,7 +104119,7 @@ func _roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } *(*float64)(unsafe.Pointer(bp)) = float64(int64(*(*float64)(unsafe.Pointer(bp)) + v1)) } else { - zBuf = Xsqlite3_mprintf(tls, __ccgo_ts+15396, libc.VaList(bp+16, int32(n), *(*float64)(unsafe.Pointer(bp)))) + zBuf = Xsqlite3_mprintf(tls, __ccgo_ts+15421, libc.VaList(bp+16, int32(n), *(*float64)(unsafe.Pointer(bp)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return @@ -104521,7 +104699,7 @@ func _likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { */ nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { - Xsqlite3_result_error(tls, context, __ccgo_ts+15402, -int32(1)) + Xsqlite3_result_error(tls, context, __ccgo_ts+15427, -int32(1)) return } if argc == int32(3) { @@ -104533,7 +104711,7 @@ func _likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { return } if _sqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), -int32(1)) != int32(1) { - Xsqlite3_result_error(tls, context, __ccgo_ts+15435, -int32(1)) + Xsqlite3_result_error(tls, context, __ccgo_ts+15460, -int32(1)) return } escape = _sqlite3Utf8Read(tls, bp+8) @@ -104615,7 +104793,7 @@ func _errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { defer tls.Free(16) _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } // C documentation @@ -104687,28 +104865,28 @@ var _hexdigits = [16]int8{ // ** Append to pStr text that is the SQL literal representation of the // ** value contained in pValue. // */ -func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { +func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr, bEscape int32) { bp := tls.Alloc(32) defer tls.Free(32) var i int32 var nBlob Ti64 var r1 float64 - var zArg, zBlob, zText, zVal uintptr + var zArg, zBlob, zText, zVal, v2 uintptr var _ /* r2 at bp+0 */ float64 - _, _, _, _, _, _, _ = i, nBlob, r1, zArg, zBlob, zText, zVal + _, _, _, _, _, _, _, _ = i, nBlob, r1, zArg, zBlob, zText, zVal, v2 /* As currently implemented, the string must be initially empty. ** we might relax this requirement in the future, but that will ** require enhancements to the implementation. */ switch Xsqlite3_value_type(tls, pValue) { case int32(SQLITE_FLOAT): r1 = Xsqlite3_value_double(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15480, libc.VaList(bp+16, r1)) + Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15505, libc.VaList(bp+16, r1)) zVal = Xsqlite3_str_value(tls, pStr) if zVal != 0 { _sqlite3AtoF(tls, zVal, bp, libc.Int32FromUint32((*TStrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp)) { Xsqlite3_str_reset(tls, pStr) - Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15488, libc.VaList(bp+16, r1)) + Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15513, libc.VaList(bp+16, r1)) } } case int32(SQLITE_INTEGER): @@ -104740,7 +104918,12 @@ func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { } case int32(SQLITE_TEXT): zArg = Xsqlite3_value_text(tls, pValue) - Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15496, libc.VaList(bp+16, zArg)) + if bEscape != 0 { + v2 = __ccgo_ts + 15521 + } else { + v2 = __ccgo_ts + 15525 + } + Xsqlite3_str_appendf(tls, pStr, v2, libc.VaList(bp+16, zArg)) default: Xsqlite3_str_append(tls, pStr, __ccgo_ts+1666, int32(4)) break @@ -104750,6 +104933,137 @@ func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { // C documentation // // /* +// ** Return true if z[] begins with N hexadecimal digits, and write +// ** a decoding of those digits into *pVal. Or return false if any +// ** one of the first N characters in z[] is not a hexadecimal digit. +// */ +func _isNHex(tls *libc.TLS, z uintptr, N int32, pVal uintptr) (r int32) { + var i, v int32 + _, _ = i, v + v = 0 + i = 0 + for { + if !(i < N) { + break + } + if !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&libc.Int32FromInt32(0x08) != 0) { + return 0 + } + v = v<<int32(4) + libc.Int32FromUint8(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))))) + goto _1 + _1: + ; + i++ + } + *(*Tu32)(unsafe.Pointer(pVal)) = libc.Uint32FromInt32(v) + return int32(1) +} + +// C documentation +// +// /* +// ** Implementation of the UNISTR() function. +// ** +// ** This is intended to be a work-alike of the UNISTR() function in +// ** PostgreSQL. Quoting from the PG documentation (PostgreSQL 17 - +// ** scraped on 2025-02-22): +// ** +// ** Evaluate escaped Unicode characters in the argument. Unicode +// ** characters can be specified as \XXXX (4 hexadecimal digits), +// ** \+XXXXXX (6 hexadecimal digits), \uXXXX (4 hexadecimal digits), +// ** or \UXXXXXXXX (8 hexadecimal digits). To specify a backslash, +// ** write two backslashes. All other characters are taken literally. +// */ +func _unistrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { + bp := tls.Alloc(16) + defer tls.Free(16) + var i, j, n, nIn, v1, v2 int32 + var z, zIn, zOut uintptr + var _ /* v at bp+0 */ Tu32 + _, _, _, _, _, _, _, _, _ = i, j, n, nIn, z, zIn, zOut, v1, v2 + _ = argc + zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + if zIn == uintptr(0) { + return + } + nIn = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) + zOut = Xsqlite3_malloc64(tls, libc.Uint64FromInt32(nIn+int32(1))) + if zOut == uintptr(0) { + Xsqlite3_result_error_nomem(tls, context) + return + } + v1 = libc.Int32FromInt32(0) + j = v1 + i = v1 + for i < nIn { + z = libc.Xstrchr(tls, zIn+uintptr(i), int32('\\')) + if z == uintptr(0) { + n = nIn - i + libc.Xmemmove(tls, zOut+uintptr(j), zIn+uintptr(i), libc.Uint64FromInt32(n)) + j += n + break + } + n = int32(int64(z) - t__predefined_ptrdiff_t(zIn+uintptr(i))) + if n > 0 { + libc.Xmemmove(tls, zOut+uintptr(j), zIn+uintptr(i), libc.Uint64FromInt32(n)) + j += n + i += n + } + if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('\\') { + i += int32(2) + v2 = j + j++ + *(*int8)(unsafe.Pointer(zOut + uintptr(v2))) = int8('\\') + } else { + if libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1)))))])&int32(0x08) != 0 { + if !(_isNHex(tls, zIn+uintptr(i+int32(1)), int32(4), bp) != 0) { + goto unistr_error + } + i += int32(5) + j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp))) + } else { + if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('+') { + if !(_isNHex(tls, zIn+uintptr(i+int32(2)), int32(6), bp) != 0) { + goto unistr_error + } + i += int32(8) + j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp))) + } else { + if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('u') { + if !(_isNHex(tls, zIn+uintptr(i+int32(2)), int32(4), bp) != 0) { + goto unistr_error + } + i += int32(6) + j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp))) + } else { + if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('U') { + if !(_isNHex(tls, zIn+uintptr(i+int32(2)), int32(8), bp) != 0) { + goto unistr_error + } + i += int32(10) + j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp))) + } else { + goto unistr_error + } + } + } + } + } + } + *(*int8)(unsafe.Pointer(zOut + uintptr(j))) = 0 + Xsqlite3_result_text64(tls, context, zOut, libc.Uint64FromInt32(j), __ccgo_fp(Xsqlite3_free), uint8(SQLITE_UTF8)) + return + goto unistr_error +unistr_error: + ; + Xsqlite3_free(tls, zOut) + Xsqlite3_result_error(tls, context, __ccgo_ts+15528, -int32(1)) + return +} + +// C documentation +// +// /* // ** Implementation of the QUOTE() function. // ** // ** The quote(X) function returns the text of an SQL literal which is the @@ -104758,6 +105072,10 @@ func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { // ** as needed. BLOBs are encoded as hexadecimal literals. Strings with // ** embedded NUL characters cannot be represented as string literals in SQL // ** and hence the returned string literal is truncated prior to the first NUL. +// ** +// ** If sqlite3_user_data() is non-zero, then the UNISTR_QUOTE() function is +// ** implemented instead. The difference is that UNISTR_QUOTE() uses the +// ** UNISTR() function to escape control characters. // */ func _quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { bp := tls.Alloc(32) @@ -104768,7 +105086,7 @@ func _quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { db = Xsqlite3_context_db_handle(tls, context) _ = argc _sqlite3StrAccumInit(tls, bp, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) - _sqlite3QuoteValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv))) + _sqlite3QuoteValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv)), int32(int64(Xsqlite3_user_data(tls, context)))) Xsqlite3_result_text(tls, context, _sqlite3StrAccumFinish(tls, bp), libc.Int32FromUint32((*(*Tsqlite3_str)(unsafe.Pointer(bp))).FnChar), __ccgo_fp(_sqlite3OomClear)) if libc.Int32FromUint8((*(*Tsqlite3_str)(unsafe.Pointer(bp))).FaccError) != SQLITE_OK { Xsqlite3_result_null(tls, context) @@ -105292,7 +105610,7 @@ var _lenOne = [1]uint32{ } var _azOne = [1]uintptr{ - 0: __ccgo_ts + 11391, + 0: __ccgo_ts + 11416, } // C documentation @@ -105452,7 +105770,7 @@ func _soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } else { /* IMP: R-64894-50321 The string "?000" is returned if the argument ** is NULL or contains no ASCII alphabetic characters. */ - Xsqlite3_result_text(tls, context, __ccgo_ts+15499, int32(4), libc.UintptrFromInt32(0)) + Xsqlite3_result_text(tls, context, __ccgo_ts+15551, int32(4), libc.UintptrFromInt32(0)) } } @@ -105513,7 +105831,7 @@ func _loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { ** flag is set. See the sqlite3_enable_load_extension() API. */ if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, __ccgo_ts+12609, -int32(1)) + Xsqlite3_result_error(tls, context, __ccgo_ts+12634, -int32(1)) return } if argc == int32(2) { @@ -105623,7 +105941,7 @@ func _kahanBabuskaNeumaierInit(tls *libc.TLS, p uintptr, iVal Ti64) { // ** that it returns NULL if it sums over no inputs. TOTAL returns // ** 0.0 in that case. In addition, TOTAL always returns a float where // ** SUM might return an integer if it never encounters a floating point -// ** value. TOTAL never fails, but SUM might through an exception if +// ** value. TOTAL never fails, but SUM might throw an exception if // ** it overflows an integer. // */ func _sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { @@ -105705,7 +106023,7 @@ func _sumFinalize(tls *libc.TLS, context uintptr) { if p != 0 && (*TSumCtx)(unsafe.Pointer(p)).Fcnt > 0 { if (*TSumCtx)(unsafe.Pointer(p)).Fapprox != 0 { if (*TSumCtx)(unsafe.Pointer(p)).Fovrfl != 0 { - Xsqlite3_result_error(tls, context, __ccgo_ts+15379, -int32(1)) + Xsqlite3_result_error(tls, context, __ccgo_ts+15404, -int32(1)) } else { if !(_sqlite3IsOverflow(tls, (*TSumCtx)(unsafe.Pointer(p)).FrErr) != 0) { Xsqlite3_result_double(tls, context, (*TSumCtx)(unsafe.Pointer(p)).FrSum+(*TSumCtx)(unsafe.Pointer(p)).FrErr) @@ -106055,7 +106373,7 @@ func _groupConcatValue(tls *libc.TLS, context uintptr) { func _sqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { var rc int32 _ = rc - rc = Xsqlite3_overload_function(tls, db, __ccgo_ts+15504, int32(2)) + rc = Xsqlite3_overload_function(tls, db, __ccgo_ts+15556, int32(2)) if rc == int32(SQLITE_NOMEM) { _sqlite3OomFault(tls, db) } @@ -106084,8 +106402,8 @@ func _sqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 if !(nArg <= int32(3)) { break } - _sqlite3CreateFunc(tls, db, __ccgo_ts+15510, nArg, int32(SQLITE_UTF8), pInfo, __ccgo_fp(_likeFunc), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - pDef = _sqlite3FindFunction(tls, db, __ccgo_ts+15510, nArg, uint8(SQLITE_UTF8), uint8(0)) + _sqlite3CreateFunc(tls, db, __ccgo_ts+15562, nArg, int32(SQLITE_UTF8), pInfo, __ccgo_fp(_likeFunc), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + pDef = _sqlite3FindFunction(tls, db, __ccgo_ts+15562, nArg, uint8(SQLITE_UTF8), uint8(0)) *(*Tu32)(unsafe.Pointer(pDef + 4)) |= libc.Uint32FromInt32(flags) *(*Tu32)(unsafe.Pointer(pDef + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SQLITE_FUNC_UNSAFE)) goto _1 @@ -106373,7 +106691,7 @@ func _sqlite3RegisterBuiltinFunctions(tls *libc.TLS) { _sqlite3WindowFunctions(tls) _sqlite3RegisterDateTimeFunctions(tls) _sqlite3RegisterJsonFunctions(tls) - _sqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&_aBuiltinFunc)), libc.Int32FromUint64(libc.Uint64FromInt64(7488)/libc.Uint64FromInt64(72))) + _sqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&_aBuiltinFunc)), libc.Int32FromUint64(libc.Uint64FromInt64(7632)/libc.Uint64FromInt64(72))) } /* @@ -106386,542 +106704,553 @@ func _sqlite3RegisterBuiltinFunctions(tls *libc.TLS) { ** ** For peak efficiency, put the most frequently used function last. */ -var _aBuiltinFunc = [104]TFuncDef{ +var _aBuiltinFunc = [106]TFuncDef{ 0: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_implies_nonnull_row))), - FzName: __ccgo_ts + 15515, + FzName: __ccgo_ts + 15567, }, 1: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_expr_compare))), - FzName: __ccgo_ts + 15535, + FzName: __ccgo_ts + 15587, }, 2: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_expr_implies_expr))), - FzName: __ccgo_ts + 15548, + FzName: __ccgo_ts + 15600, }, 3: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_affinity))), - FzName: __ccgo_ts + 15566, + FzName: __ccgo_ts + 15618, }, 4: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15575, + FzName: __ccgo_ts + 15627, }, 5: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DIRECTONLY) | libc.Int32FromInt32(SQLITE_FUNC_UNSAFE)), - FzName: __ccgo_ts + 15583, + FzName: __ccgo_ts + 15635, }, 6: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DIRECTONLY) | libc.Int32FromInt32(SQLITE_FUNC_UNSAFE)), - FzName: __ccgo_ts + 15583, + FzName: __ccgo_ts + 15635, }, 7: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 15598, + FzName: __ccgo_ts + 15650, }, 8: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 15624, + FzName: __ccgo_ts + 15676, }, 9: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_FUNC_UNLIKELY)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_unlikely))), - FzName: __ccgo_ts + 15649, + FzName: __ccgo_ts + 15701, }, 10: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_FUNC_UNLIKELY)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_unlikely))), - FzName: __ccgo_ts + 15658, + FzName: __ccgo_ts + 15710, }, 11: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_FUNC_UNLIKELY)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_unlikely))), - FzName: __ccgo_ts + 15669, + FzName: __ccgo_ts + 15721, }, 12: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_sqlite_offset))), - FzName: __ccgo_ts + 15676, + FzName: __ccgo_ts + 15728, }, 13: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(1))), - FzName: __ccgo_ts + 15690, + FzName: __ccgo_ts + 15742, }, 14: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(1))), - FzName: __ccgo_ts + 15690, + FzName: __ccgo_ts + 15742, }, 15: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(2))), - FzName: __ccgo_ts + 15696, + FzName: __ccgo_ts + 15748, }, 16: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(2))), - FzName: __ccgo_ts + 15696, + FzName: __ccgo_ts + 15748, }, 17: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(3))), - FzName: __ccgo_ts + 15702, + FzName: __ccgo_ts + 15754, }, 18: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(3))), - FzName: __ccgo_ts + 15702, + FzName: __ccgo_ts + 15754, }, 19: { FnArg: int16(-int32(3)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15707, + FzName: __ccgo_ts + 15759, }, 20: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_MINMAX) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)), - FzName: __ccgo_ts + 15707, + FzName: __ccgo_ts + 15759, }, 21: { FnArg: int16(-int32(3)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(1))), - FzName: __ccgo_ts + 15711, + FzName: __ccgo_ts + 15763, }, 22: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_MINMAX) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)), FpUserData: uintptr(int64(libc.Int32FromInt32(1))), - FzName: __ccgo_ts + 15711, + FzName: __ccgo_ts + 15763, }, 23: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_TYPEOF)), - FzName: __ccgo_ts + 15715, + FzName: __ccgo_ts + 15767, }, 24: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_TYPEOF) | libc.Int32FromInt32(SQLITE_SUBTYPE)), - FzName: __ccgo_ts + 15722, + FzName: __ccgo_ts + 15774, }, 25: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_LENGTH)), - FzName: __ccgo_ts + 15730, + FzName: __ccgo_ts + 15782, }, 26: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_BYTELEN)), - FzName: __ccgo_ts + 15737, + FzName: __ccgo_ts + 15789, }, 27: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15750, + FzName: __ccgo_ts + 15802, }, 28: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15756, + FzName: __ccgo_ts + 15808, }, 29: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15763, + FzName: __ccgo_ts + 15815, }, 30: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15770, + FzName: __ccgo_ts + 15822, }, 31: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15778, + FzName: __ccgo_ts + 15830, }, 32: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15783, + FzName: __ccgo_ts + 15835, }, 33: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15787, + FzName: __ccgo_ts + 15839, }, 34: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15787, + FzName: __ccgo_ts + 15839, }, 35: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15793, + FzName: __ccgo_ts + 15845, }, 36: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15799, + FzName: __ccgo_ts + 15851, }, 37: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15805, + FzName: __ccgo_ts + 15857, }, 38: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15809, + FzName: __ccgo_ts + 15861, }, 39: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15809, + FzName: __ccgo_ts + 15861, }, 40: { FnArg: int16(-int32(3)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15815, + FzName: __ccgo_ts + 15867, }, 41: { FnArg: int16(-int32(4)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15822, + FzName: __ccgo_ts + 15874, }, 42: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 15832, + FzName: __ccgo_ts + 15884, }, 43: { FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15839, + FzName: __ccgo_ts + 15891, }, 44: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15846, + FzName: __ccgo_ts + 15898, }, 45: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15857, + FzName: __ccgo_ts + 15909, }, 46: { FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 15864, + FzName: __ccgo_ts + 15916, }, 47: { FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 15879, + FzName: __ccgo_ts + 15931, }, 48: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15896, + FzName: __ccgo_ts + 15948, }, 49: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15907, + FzName: __ccgo_ts + 15959, }, 50: { - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15913, + FnArg: int16(1), + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FzName: __ccgo_ts + 15966, }, 51: { - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15931, + FnArg: int16(1), + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FpUserData: uintptr(int64(libc.Int32FromInt32(1))), + FzName: __ccgo_ts + 15972, }, 52: { FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15939, + FzName: __ccgo_ts + 15985, }, 53: { - FnArg: int16(3), - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15953, + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FzName: __ccgo_ts + 16003, }, 54: { - FnArg: int16(1), - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15961, + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FzName: __ccgo_ts + 16011, }, 55: { - FnArg: int16(2), + FnArg: int16(3), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15970, + FzName: __ccgo_ts + 16025, }, 56: { - FnArg: int16(3), + FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15970, + FzName: __ccgo_ts + 16033, }, 57: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15977, + FzName: __ccgo_ts + 16042, }, 58: { FnArg: int16(3), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 15977, + FzName: __ccgo_ts + 16042, }, 59: { + FnArg: int16(2), + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FzName: __ccgo_ts + 16049, + }, + 60: { + FnArg: int16(3), + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FzName: __ccgo_ts + 16049, + }, + 61: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 15987, + FzName: __ccgo_ts + 16059, }, - 60: { + 62: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 15991, + FzName: __ccgo_ts + 16063, }, - 61: { + 63: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 15997, + FzName: __ccgo_ts + 16069, }, - 62: { + 64: { FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_COUNT) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)), - FzName: __ccgo_ts + 16001, + FzName: __ccgo_ts + 16073, }, - 63: { + 65: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)), - FzName: __ccgo_ts + 16001, + FzName: __ccgo_ts + 16073, }, - 64: { + 66: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 16007, + FzName: __ccgo_ts + 16079, }, - 65: { + 67: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 16007, + FzName: __ccgo_ts + 16079, }, - 66: { + 68: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 16020, + FzName: __ccgo_ts + 16092, }, - 67: { + 69: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_LIKE) | libc.Int32FromInt32(SQLITE_FUNC_CASE)), FpUserData: uintptr(unsafe.Pointer(&_globInfo)), - FzName: __ccgo_ts + 16031, + FzName: __ccgo_ts + 16103, }, - 68: { + 70: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_LIKE)), FpUserData: uintptr(unsafe.Pointer(&_likeInfoNorm)), - FzName: __ccgo_ts + 15510, + FzName: __ccgo_ts + 15562, }, - 69: { + 71: { FnArg: int16(3), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_LIKE)), FpUserData: uintptr(unsafe.Pointer(&_likeInfoNorm)), - FzName: __ccgo_ts + 15510, + FzName: __ccgo_ts + 15562, }, - 70: { + 72: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16036, + FzName: __ccgo_ts + 16108, }, - 71: { + 73: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), FzName: __ccgo_ts + 1238, }, - 72: { + 74: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), FzName: __ccgo_ts + 1246, }, - 73: { + 75: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16041, + FzName: __ccgo_ts + 16113, }, - 74: { + 76: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 16047, + FzName: __ccgo_ts + 16119, }, - 75: { + 77: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(1))), - FzName: __ccgo_ts + 16050, + FzName: __ccgo_ts + 16122, }, - 76: { + 78: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(1))), - FzName: __ccgo_ts + 16054, + FzName: __ccgo_ts + 16126, }, - 77: { + 79: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), FpUserData: uintptr(int64(libc.Int32FromInt32(2))), - FzName: __ccgo_ts + 16060, - }, - 78: { - FnArg: int16(2), - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 16050, - }, - 79: { - FnArg: int16(1), - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16065, + FzName: __ccgo_ts + 16132, }, 80: { FnArg: int16(2), - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16069, + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FzName: __ccgo_ts + 16122, }, 81: { - FnArg: int16(2), + FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16073, + FzName: __ccgo_ts + 16137, }, 82: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16079, + FzName: __ccgo_ts + 16141, }, 83: { - FnArg: int16(1), + FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16083, + FzName: __ccgo_ts + 16145, }, 84: { - FnArg: int16(1), + FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16088, + FzName: __ccgo_ts + 16151, }, 85: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16093, + FzName: __ccgo_ts + 16155, }, 86: { - FnArg: int16(2), + FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16098, + FzName: __ccgo_ts + 16160, }, 87: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16104, + FzName: __ccgo_ts + 16165, }, 88: { - FnArg: int16(1), + FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16108, + FzName: __ccgo_ts + 16170, }, 89: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16112, + FzName: __ccgo_ts + 16176, }, 90: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16116, + FzName: __ccgo_ts + 16180, }, 91: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16121, + FzName: __ccgo_ts + 16184, }, 92: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16126, + FzName: __ccgo_ts + 16188, }, 93: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16131, + FzName: __ccgo_ts + 16193, }, 94: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16137, + FzName: __ccgo_ts + 16198, }, 95: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16143, + FzName: __ccgo_ts + 16203, }, 96: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16149, + FzName: __ccgo_ts + 16209, }, 97: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16154, + FzName: __ccgo_ts + 16215, }, 98: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16162, + FzName: __ccgo_ts + 16221, }, 99: { + FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), - FzName: __ccgo_ts + 16170, + FzName: __ccgo_ts + 16226, }, 100: { FnArg: int16(1), - FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), - FzName: __ccgo_ts + 16173, + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), + FzName: __ccgo_ts + 16234, }, 101: { + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)), + FzName: __ccgo_ts + 16242, + }, + 102: { + FnArg: int16(1), + FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)), + FzName: __ccgo_ts + 16245, + }, + 103: { FnArg: int16(-int32(4)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), - FzName: __ccgo_ts + 6858, + FzName: __ccgo_ts + 6883, }, - 102: { + 104: { FnArg: int16(-int32(4)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_iif))), - FzName: __ccgo_ts + 16178, + FzName: __ccgo_ts + 16250, }, - 103: { + 105: { FnArg: int16(-int32(4)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)), FpUserData: uintptr(int64(libc.Int32FromInt32(INLINEFUNC_iif))), - FzName: __ccgo_ts + 16182, + FzName: __ccgo_ts + 16254, }, } @@ -106980,109 +107309,111 @@ func init() { *(*uintptr)(unsafe.Add(p, 3336)) = __ccgo_fp(_versionFunc) *(*uintptr)(unsafe.Add(p, 3408)) = __ccgo_fp(_sourceidFunc) *(*uintptr)(unsafe.Add(p, 3480)) = __ccgo_fp(_errlogFunc) - *(*uintptr)(unsafe.Add(p, 3552)) = __ccgo_fp(_quoteFunc) - *(*uintptr)(unsafe.Add(p, 3624)) = __ccgo_fp(_last_insert_rowid) - *(*uintptr)(unsafe.Add(p, 3696)) = __ccgo_fp(_changes) - *(*uintptr)(unsafe.Add(p, 3768)) = __ccgo_fp(_total_changes) - *(*uintptr)(unsafe.Add(p, 3840)) = __ccgo_fp(_replaceFunc) - *(*uintptr)(unsafe.Add(p, 3912)) = __ccgo_fp(_zeroblobFunc) - *(*uintptr)(unsafe.Add(p, 3984)) = __ccgo_fp(_substrFunc) - *(*uintptr)(unsafe.Add(p, 4056)) = __ccgo_fp(_substrFunc) + *(*uintptr)(unsafe.Add(p, 3552)) = __ccgo_fp(_unistrFunc) + *(*uintptr)(unsafe.Add(p, 3624)) = __ccgo_fp(_quoteFunc) + *(*uintptr)(unsafe.Add(p, 3696)) = __ccgo_fp(_quoteFunc) + *(*uintptr)(unsafe.Add(p, 3768)) = __ccgo_fp(_last_insert_rowid) + *(*uintptr)(unsafe.Add(p, 3840)) = __ccgo_fp(_changes) + *(*uintptr)(unsafe.Add(p, 3912)) = __ccgo_fp(_total_changes) + *(*uintptr)(unsafe.Add(p, 3984)) = __ccgo_fp(_replaceFunc) + *(*uintptr)(unsafe.Add(p, 4056)) = __ccgo_fp(_zeroblobFunc) *(*uintptr)(unsafe.Add(p, 4128)) = __ccgo_fp(_substrFunc) *(*uintptr)(unsafe.Add(p, 4200)) = __ccgo_fp(_substrFunc) - *(*uintptr)(unsafe.Add(p, 4272)) = __ccgo_fp(_sumStep) - *(*uintptr)(unsafe.Add(p, 4280)) = __ccgo_fp(_sumFinalize) - *(*uintptr)(unsafe.Add(p, 4288)) = __ccgo_fp(_sumFinalize) - *(*uintptr)(unsafe.Add(p, 4296)) = __ccgo_fp(_sumInverse) - *(*uintptr)(unsafe.Add(p, 4344)) = __ccgo_fp(_sumStep) - *(*uintptr)(unsafe.Add(p, 4352)) = __ccgo_fp(_totalFinalize) - *(*uintptr)(unsafe.Add(p, 4360)) = __ccgo_fp(_totalFinalize) - *(*uintptr)(unsafe.Add(p, 4368)) = __ccgo_fp(_sumInverse) + *(*uintptr)(unsafe.Add(p, 4272)) = __ccgo_fp(_substrFunc) + *(*uintptr)(unsafe.Add(p, 4344)) = __ccgo_fp(_substrFunc) *(*uintptr)(unsafe.Add(p, 4416)) = __ccgo_fp(_sumStep) - *(*uintptr)(unsafe.Add(p, 4424)) = __ccgo_fp(_avgFinalize) - *(*uintptr)(unsafe.Add(p, 4432)) = __ccgo_fp(_avgFinalize) + *(*uintptr)(unsafe.Add(p, 4424)) = __ccgo_fp(_sumFinalize) + *(*uintptr)(unsafe.Add(p, 4432)) = __ccgo_fp(_sumFinalize) *(*uintptr)(unsafe.Add(p, 4440)) = __ccgo_fp(_sumInverse) - *(*uintptr)(unsafe.Add(p, 4488)) = __ccgo_fp(_countStep) - *(*uintptr)(unsafe.Add(p, 4496)) = __ccgo_fp(_countFinalize) - *(*uintptr)(unsafe.Add(p, 4504)) = __ccgo_fp(_countFinalize) - *(*uintptr)(unsafe.Add(p, 4512)) = __ccgo_fp(_countInverse) - *(*uintptr)(unsafe.Add(p, 4560)) = __ccgo_fp(_countStep) - *(*uintptr)(unsafe.Add(p, 4568)) = __ccgo_fp(_countFinalize) - *(*uintptr)(unsafe.Add(p, 4576)) = __ccgo_fp(_countFinalize) - *(*uintptr)(unsafe.Add(p, 4584)) = __ccgo_fp(_countInverse) - *(*uintptr)(unsafe.Add(p, 4632)) = __ccgo_fp(_groupConcatStep) - *(*uintptr)(unsafe.Add(p, 4640)) = __ccgo_fp(_groupConcatFinalize) - *(*uintptr)(unsafe.Add(p, 4648)) = __ccgo_fp(_groupConcatValue) - *(*uintptr)(unsafe.Add(p, 4656)) = __ccgo_fp(_groupConcatInverse) - *(*uintptr)(unsafe.Add(p, 4704)) = __ccgo_fp(_groupConcatStep) - *(*uintptr)(unsafe.Add(p, 4712)) = __ccgo_fp(_groupConcatFinalize) - *(*uintptr)(unsafe.Add(p, 4720)) = __ccgo_fp(_groupConcatValue) - *(*uintptr)(unsafe.Add(p, 4728)) = __ccgo_fp(_groupConcatInverse) + *(*uintptr)(unsafe.Add(p, 4488)) = __ccgo_fp(_sumStep) + *(*uintptr)(unsafe.Add(p, 4496)) = __ccgo_fp(_totalFinalize) + *(*uintptr)(unsafe.Add(p, 4504)) = __ccgo_fp(_totalFinalize) + *(*uintptr)(unsafe.Add(p, 4512)) = __ccgo_fp(_sumInverse) + *(*uintptr)(unsafe.Add(p, 4560)) = __ccgo_fp(_sumStep) + *(*uintptr)(unsafe.Add(p, 4568)) = __ccgo_fp(_avgFinalize) + *(*uintptr)(unsafe.Add(p, 4576)) = __ccgo_fp(_avgFinalize) + *(*uintptr)(unsafe.Add(p, 4584)) = __ccgo_fp(_sumInverse) + *(*uintptr)(unsafe.Add(p, 4632)) = __ccgo_fp(_countStep) + *(*uintptr)(unsafe.Add(p, 4640)) = __ccgo_fp(_countFinalize) + *(*uintptr)(unsafe.Add(p, 4648)) = __ccgo_fp(_countFinalize) + *(*uintptr)(unsafe.Add(p, 4656)) = __ccgo_fp(_countInverse) + *(*uintptr)(unsafe.Add(p, 4704)) = __ccgo_fp(_countStep) + *(*uintptr)(unsafe.Add(p, 4712)) = __ccgo_fp(_countFinalize) + *(*uintptr)(unsafe.Add(p, 4720)) = __ccgo_fp(_countFinalize) + *(*uintptr)(unsafe.Add(p, 4728)) = __ccgo_fp(_countInverse) *(*uintptr)(unsafe.Add(p, 4776)) = __ccgo_fp(_groupConcatStep) *(*uintptr)(unsafe.Add(p, 4784)) = __ccgo_fp(_groupConcatFinalize) *(*uintptr)(unsafe.Add(p, 4792)) = __ccgo_fp(_groupConcatValue) *(*uintptr)(unsafe.Add(p, 4800)) = __ccgo_fp(_groupConcatInverse) - *(*uintptr)(unsafe.Add(p, 4848)) = __ccgo_fp(_likeFunc) - *(*uintptr)(unsafe.Add(p, 4920)) = __ccgo_fp(_likeFunc) + *(*uintptr)(unsafe.Add(p, 4848)) = __ccgo_fp(_groupConcatStep) + *(*uintptr)(unsafe.Add(p, 4856)) = __ccgo_fp(_groupConcatFinalize) + *(*uintptr)(unsafe.Add(p, 4864)) = __ccgo_fp(_groupConcatValue) + *(*uintptr)(unsafe.Add(p, 4872)) = __ccgo_fp(_groupConcatInverse) + *(*uintptr)(unsafe.Add(p, 4920)) = __ccgo_fp(_groupConcatStep) + *(*uintptr)(unsafe.Add(p, 4928)) = __ccgo_fp(_groupConcatFinalize) + *(*uintptr)(unsafe.Add(p, 4936)) = __ccgo_fp(_groupConcatValue) + *(*uintptr)(unsafe.Add(p, 4944)) = __ccgo_fp(_groupConcatInverse) *(*uintptr)(unsafe.Add(p, 4992)) = __ccgo_fp(_likeFunc) - *(*uintptr)(unsafe.Add(p, 5048)) = __ccgo_fp(_xCeil) - *(*uintptr)(unsafe.Add(p, 5064)) = __ccgo_fp(_ceilingFunc) - *(*uintptr)(unsafe.Add(p, 5120)) = __ccgo_fp(_xCeil) - *(*uintptr)(unsafe.Add(p, 5136)) = __ccgo_fp(_ceilingFunc) - *(*uintptr)(unsafe.Add(p, 5192)) = __ccgo_fp(_xFloor) + *(*uintptr)(unsafe.Add(p, 5064)) = __ccgo_fp(_likeFunc) + *(*uintptr)(unsafe.Add(p, 5136)) = __ccgo_fp(_likeFunc) + *(*uintptr)(unsafe.Add(p, 5192)) = __ccgo_fp(_xCeil) *(*uintptr)(unsafe.Add(p, 5208)) = __ccgo_fp(_ceilingFunc) - *(*uintptr)(unsafe.Add(p, 5264)) = __ccgo_fp(libc.Xtrunc) + *(*uintptr)(unsafe.Add(p, 5264)) = __ccgo_fp(_xCeil) *(*uintptr)(unsafe.Add(p, 5280)) = __ccgo_fp(_ceilingFunc) - *(*uintptr)(unsafe.Add(p, 5352)) = __ccgo_fp(_logFunc) - *(*uintptr)(unsafe.Add(p, 5424)) = __ccgo_fp(_logFunc) + *(*uintptr)(unsafe.Add(p, 5336)) = __ccgo_fp(_xFloor) + *(*uintptr)(unsafe.Add(p, 5352)) = __ccgo_fp(_ceilingFunc) + *(*uintptr)(unsafe.Add(p, 5408)) = __ccgo_fp(libc.Xtrunc) + *(*uintptr)(unsafe.Add(p, 5424)) = __ccgo_fp(_ceilingFunc) *(*uintptr)(unsafe.Add(p, 5496)) = __ccgo_fp(_logFunc) *(*uintptr)(unsafe.Add(p, 5568)) = __ccgo_fp(_logFunc) *(*uintptr)(unsafe.Add(p, 5640)) = __ccgo_fp(_logFunc) - *(*uintptr)(unsafe.Add(p, 5696)) = __ccgo_fp(libc.Xexp) - *(*uintptr)(unsafe.Add(p, 5712)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 5768)) = __ccgo_fp(libc.Xpow) - *(*uintptr)(unsafe.Add(p, 5784)) = __ccgo_fp(_math2Func) - *(*uintptr)(unsafe.Add(p, 5840)) = __ccgo_fp(libc.Xpow) - *(*uintptr)(unsafe.Add(p, 5856)) = __ccgo_fp(_math2Func) - *(*uintptr)(unsafe.Add(p, 5912)) = __ccgo_fp(libc.Xfmod) + *(*uintptr)(unsafe.Add(p, 5712)) = __ccgo_fp(_logFunc) + *(*uintptr)(unsafe.Add(p, 5784)) = __ccgo_fp(_logFunc) + *(*uintptr)(unsafe.Add(p, 5840)) = __ccgo_fp(libc.Xexp) + *(*uintptr)(unsafe.Add(p, 5856)) = __ccgo_fp(_math1Func) + *(*uintptr)(unsafe.Add(p, 5912)) = __ccgo_fp(libc.Xpow) *(*uintptr)(unsafe.Add(p, 5928)) = __ccgo_fp(_math2Func) - *(*uintptr)(unsafe.Add(p, 5984)) = __ccgo_fp(libc.Xacos) - *(*uintptr)(unsafe.Add(p, 6000)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6056)) = __ccgo_fp(libc.Xasin) - *(*uintptr)(unsafe.Add(p, 6072)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6128)) = __ccgo_fp(libc.Xatan) + *(*uintptr)(unsafe.Add(p, 5984)) = __ccgo_fp(libc.Xpow) + *(*uintptr)(unsafe.Add(p, 6000)) = __ccgo_fp(_math2Func) + *(*uintptr)(unsafe.Add(p, 6056)) = __ccgo_fp(libc.Xfmod) + *(*uintptr)(unsafe.Add(p, 6072)) = __ccgo_fp(_math2Func) + *(*uintptr)(unsafe.Add(p, 6128)) = __ccgo_fp(libc.Xacos) *(*uintptr)(unsafe.Add(p, 6144)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6200)) = __ccgo_fp(libc.Xatan2) - *(*uintptr)(unsafe.Add(p, 6216)) = __ccgo_fp(_math2Func) - *(*uintptr)(unsafe.Add(p, 6272)) = __ccgo_fp(libc.Xcos) + *(*uintptr)(unsafe.Add(p, 6200)) = __ccgo_fp(libc.Xasin) + *(*uintptr)(unsafe.Add(p, 6216)) = __ccgo_fp(_math1Func) + *(*uintptr)(unsafe.Add(p, 6272)) = __ccgo_fp(libc.Xatan) *(*uintptr)(unsafe.Add(p, 6288)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6344)) = __ccgo_fp(libc.Xsin) - *(*uintptr)(unsafe.Add(p, 6360)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6416)) = __ccgo_fp(libc.Xtan) + *(*uintptr)(unsafe.Add(p, 6344)) = __ccgo_fp(libc.Xatan2) + *(*uintptr)(unsafe.Add(p, 6360)) = __ccgo_fp(_math2Func) + *(*uintptr)(unsafe.Add(p, 6416)) = __ccgo_fp(libc.Xcos) *(*uintptr)(unsafe.Add(p, 6432)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6488)) = __ccgo_fp(libc.Xcosh) + *(*uintptr)(unsafe.Add(p, 6488)) = __ccgo_fp(libc.Xsin) *(*uintptr)(unsafe.Add(p, 6504)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6560)) = __ccgo_fp(libc.Xsinh) + *(*uintptr)(unsafe.Add(p, 6560)) = __ccgo_fp(libc.Xtan) *(*uintptr)(unsafe.Add(p, 6576)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6632)) = __ccgo_fp(libc.Xtanh) + *(*uintptr)(unsafe.Add(p, 6632)) = __ccgo_fp(libc.Xcosh) *(*uintptr)(unsafe.Add(p, 6648)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6704)) = __ccgo_fp(libc.Xacosh) + *(*uintptr)(unsafe.Add(p, 6704)) = __ccgo_fp(libc.Xsinh) *(*uintptr)(unsafe.Add(p, 6720)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6776)) = __ccgo_fp(libc.Xasinh) + *(*uintptr)(unsafe.Add(p, 6776)) = __ccgo_fp(libc.Xtanh) *(*uintptr)(unsafe.Add(p, 6792)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6848)) = __ccgo_fp(libc.Xatanh) + *(*uintptr)(unsafe.Add(p, 6848)) = __ccgo_fp(libc.Xacosh) *(*uintptr)(unsafe.Add(p, 6864)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6920)) = __ccgo_fp(libc.Xsqrt) + *(*uintptr)(unsafe.Add(p, 6920)) = __ccgo_fp(libc.Xasinh) *(*uintptr)(unsafe.Add(p, 6936)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 6992)) = __ccgo_fp(_degToRad) + *(*uintptr)(unsafe.Add(p, 6992)) = __ccgo_fp(libc.Xatanh) *(*uintptr)(unsafe.Add(p, 7008)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 7064)) = __ccgo_fp(_radToDeg) + *(*uintptr)(unsafe.Add(p, 7064)) = __ccgo_fp(libc.Xsqrt) *(*uintptr)(unsafe.Add(p, 7080)) = __ccgo_fp(_math1Func) - *(*uintptr)(unsafe.Add(p, 7152)) = __ccgo_fp(_piFunc) - *(*uintptr)(unsafe.Add(p, 7224)) = __ccgo_fp(_signFunc) - *(*uintptr)(unsafe.Add(p, 7296)) = __ccgo_fp(_versionFunc) - *(*uintptr)(unsafe.Add(p, 7368)) = __ccgo_fp(_versionFunc) + *(*uintptr)(unsafe.Add(p, 7136)) = __ccgo_fp(_degToRad) + *(*uintptr)(unsafe.Add(p, 7152)) = __ccgo_fp(_math1Func) + *(*uintptr)(unsafe.Add(p, 7208)) = __ccgo_fp(_radToDeg) + *(*uintptr)(unsafe.Add(p, 7224)) = __ccgo_fp(_math1Func) + *(*uintptr)(unsafe.Add(p, 7296)) = __ccgo_fp(_piFunc) + *(*uintptr)(unsafe.Add(p, 7368)) = __ccgo_fp(_signFunc) *(*uintptr)(unsafe.Add(p, 7440)) = __ccgo_fp(_versionFunc) + *(*uintptr)(unsafe.Add(p, 7512)) = __ccgo_fp(_versionFunc) + *(*uintptr)(unsafe.Add(p, 7584)) = __ccgo_fp(_versionFunc) } /************** End of func.c ************************************************/ @@ -107399,7 +107730,7 @@ func _sqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey } if !(pIdx != 0) { if !((*TParse)(unsafe.Pointer(pParse)).FdisableTriggers != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16185, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TFKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*TFKey)(unsafe.Pointer(pFKey)).FzTo)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16257, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TFKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*TFKey)(unsafe.Pointer(pFKey)).FzTo)) } _sqlite3DbFree(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, aiCol) return int32(1) @@ -108223,7 +108554,7 @@ func _sqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, (*TSrcItem)(unsafe.Pointer(pItem)).FpSTab = (*TFKey)(unsafe.Pointer(pFKey)).FpFrom (*TSrcItem)(unsafe.Pointer(pItem)).FzName = (*TTable)(unsafe.Pointer((*TFKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem)).FpSTab)).FnTabRef++ - v7 = pParse + 56 + v7 = pParse + 60 v6 = *(*int32)(unsafe.Pointer(v7)) *(*int32)(unsafe.Pointer(v7))++ (*TSrcItem)(unsafe.Pointer(pItem)).FiCursor = v6 @@ -108510,11 +108841,11 @@ func _fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr break } *(*TToken)(unsafe.Pointer(bp + 16)) = TToken{ - Fz: __ccgo_ts + 6724, + Fz: __ccgo_ts + 6749, Fn: uint32(3), } /* Literal "old" token */ *(*TToken)(unsafe.Pointer(bp + 32)) = TToken{ - Fz: __ccgo_ts + 6720, + Fz: __ccgo_ts + 6745, Fn: uint32(3), } /* tFromCol = OLD.tToCol */ if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { @@ -108578,7 +108909,7 @@ func _fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr nFrom = _sqlite3Strlen30(tls, zFrom) if action == int32(OE_Restrict) { iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema) - pRaise = _sqlite3Expr(tls, db, int32(TK_STRING), __ccgo_ts+5308) + pRaise = _sqlite3Expr(tls, db, int32(TK_STRING), __ccgo_ts+5334) pRaise = _sqlite3PExpr(tls, pParse, int32(TK_RAISE), pRaise, uintptr(0)) if pRaise != 0 { (*TExpr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) @@ -109160,7 +109491,7 @@ func _sqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8351, libc.VaList(bp+56, (*TColumn)(unsafe.Pointer(pRedo)).FzCnName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8376, libc.VaList(bp+56, (*TColumn)(unsafe.Pointer(pRedo)).FzCnName)) } (*TParse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -109226,11 +109557,11 @@ func _autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) (r in (*TAutoincInfo)(unsafe.Pointer(pInfo)).FpTab = pTab (*TAutoincInfo)(unsafe.Pointer(pInfo)).FiDb = iDb (*TParse)(unsafe.Pointer(pToplevel)).FnMem++ /* Register to hold name of table */ - v3 = pToplevel + 60 + v3 = pToplevel + 64 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = v2 /* Max rowid register */ - *(*int32)(unsafe.Pointer(pToplevel + 60)) += int32(2) /* Rowid in sqlite_sequence + orig max val */ + *(*int32)(unsafe.Pointer(pToplevel + 64)) += int32(2) /* Rowid in sqlite_sequence + orig max val */ } memId = (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr } @@ -109555,7 +109886,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint var p, pRet, pSelect, pSubq, pSubq1, v, v2 uintptr var _ /* dest at bp+0 */ TSelectDest _, _, _, _, _, _, _, _, _ = f, p, pRet, pSelect, pSubq, pSubq1, v, v1, v2 - if (*TParse)(unsafe.Pointer(pParse)).FbHasWith != 0 || (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy != 0 || _exprListIsConstant(tls, pParse, pRow) == 0 || (*TSrcList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pLeft)).FpSrc)).FnSrc == 0 && _exprListIsNoAffinity(tls, pParse, (*TSelect)(unsafe.Pointer(pLeft)).FpEList) == 0 || libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { + if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44))&0x2>>1)) != 0 || (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy != 0 || _exprListIsConstant(tls, pParse, pRow) == 0 || (*TSrcList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pLeft)).FpSrc)).FnSrc == 0 && _exprListIsNoAffinity(tls, pParse, (*TSelect)(unsafe.Pointer(pLeft)).FpEList) == 0 || libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { /* The co-routine method cannot be used. Fall back to UNION ALL. */ pSelect = uintptr(0) f = libc.Int32FromInt32(SF_Values) | libc.Int32FromInt32(SF_MultiValue) @@ -109569,7 +109900,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint } } pSelect = _sqlite3SelectNew(tls, pParse, pRow, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), libc.Uint32FromInt32(f), uintptr(0)) - *(*Tu32)(unsafe.Pointer(pLeft + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_MultiValue)) + *(*Tu32)(unsafe.Pointer(pLeft + 4)) &= ^libc.Uint32FromInt32(SF_MultiValue) if pSelect != 0 { (*TSelect)(unsafe.Pointer(pSelect)).Fop = uint8(TK_ALL) (*TSelect)(unsafe.Pointer(pSelect)).FpPrior = pLeft @@ -109604,7 +109935,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint if _sqlite3SrcItemAttachSubquery(tls, pParse, p, pLeft, 0) != 0 { pSubq = *(*uintptr)(unsafe.Pointer(p + 72)) (*TSubquery)(unsafe.Pointer(pSubq)).FaddrFillSub = _sqlite3VdbeCurrentAddr(tls, v) + int32(1) - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn = v1 @@ -109617,7 +109948,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint ** of the co-routine to a separate array for processing. */ (*(*TSelectDest)(unsafe.Pointer(bp))).FiSdst = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(3) (*(*TSelectDest)(unsafe.Pointer(bp))).FnSdst = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pLeft)).FpEList)).FnExpr - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(2) + (*(*TSelectDest)(unsafe.Pointer(bp))).FnSdst + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(2) + (*(*TSelectDest)(unsafe.Pointer(bp))).FnSdst *(*Tu32)(unsafe.Pointer(pLeft + 4)) |= uint32(SF_MultiValue) _sqlite3Select(tls, pParse, pLeft, bp) (*TSubquery)(unsafe.Pointer(pSubq)).FregResult = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSdst @@ -109744,27 +110075,27 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { bp := tls.Alloc(160) defer tls.Free(160) - var aRegIdx, aTabColMap, db, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, v, zCName, v13, v16, v18, v6, v9 uintptr - var addr1, addr11, addrCont, addrInsTop, addrL, addrTop, bUseSeek, endOfLoop, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, y, v1, v12, v15, v17, v19, v22, v23, v4, v5, v7, v8 int32 - var appendFlag, bIdListInOrder, hName, useTempTable, withoutRowid Tu8 - var colFlags, v21 Tu32 + var aRegIdx, aTabColMap, db, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, v, v12, v15, v17, v5, v8 uintptr + var addr1, addr11, addrCont, addrInsTop, addrL, addrTop, bUseSeek, endOfLoop, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, y, v1, v11, v14, v16, v18, v21, v22, v3, v4, v6, v7 int32 + var appendFlag, bIdListInOrder, useTempTable, withoutRowid Tu8 + var colFlags, v20 Tu32 var _ /* dest at bp+8 */ TSelectDest var _ /* iDataCur at bp+0 */ int32 var _ /* iIdxCur at bp+4 */ int32 var _ /* isReplace at bp+112 */ int32 var _ /* sNC at bp+56 */ TNameContext var _ /* tmask at bp+48 */ int32 - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aTabColMap, addr1, addr11, addrCont, addrInsTop, addrL, addrTop, appendFlag, bIdListInOrder, bUseSeek, colFlags, db, endOfLoop, hName, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, useTempTable, v, withoutRowid, y, zCName, v1, v12, v13, v15, v16, v17, v18, v19, v21, v22, v23, v4, v5, v6, v7, v8, v9 /* Number of columns in the data */ - nHidden = 0 /* Number of hidden columns if TABLE is virtual */ - *(*int32)(unsafe.Pointer(bp)) = 0 /* VDBE cursor that is the main data repository */ - *(*int32)(unsafe.Pointer(bp + 4)) = 0 /* First index cursor */ - ipkColumn = -int32(1) /* Label for the end of the insertion loop */ - srcTab = 0 /* Data comes from this temporary cursor if >=0 */ - addrInsTop = 0 /* Jump to label "D" */ - addrCont = 0 /* Index of database holding TABLE */ - useTempTable = uint8(0) /* Store SELECT results in intermediate table */ - appendFlag = uint8(0) /* True if IDLIST is in table order */ - pList = uintptr(0) /* Register in which to store next column */ + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aTabColMap, addr1, addr11, addrCont, addrInsTop, addrL, addrTop, appendFlag, bIdListInOrder, bUseSeek, colFlags, db, endOfLoop, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, useTempTable, v, withoutRowid, y, v1, v11, v12, v14, v15, v16, v17, v18, v20, v21, v22, v3, v4, v5, v6, v7, v8 /* Number of columns in the data */ + nHidden = 0 /* Number of hidden columns if TABLE is virtual */ + *(*int32)(unsafe.Pointer(bp)) = 0 /* VDBE cursor that is the main data repository */ + *(*int32)(unsafe.Pointer(bp + 4)) = 0 /* First index cursor */ + ipkColumn = -int32(1) /* Label for the end of the insertion loop */ + srcTab = 0 /* Data comes from this temporary cursor if >=0 */ + addrInsTop = 0 /* Jump to label "D" */ + addrCont = 0 /* Index of database holding TABLE */ + useTempTable = uint8(0) /* Store SELECT results in intermediate table */ + appendFlag = uint8(0) /* True if IDLIST is in table order */ + pList = uintptr(0) /* Register in which to store next column */ /* Register allocations */ regFromSelect = 0 /* Base register for data coming from SELECT */ regAutoinc = 0 /* Register holding the AUTOINCREMENT counter */ @@ -109845,7 +110176,7 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin v1 = (*TParse)(unsafe.Pointer(pParse)).FnMem + libc.Int32FromInt32(1) regIns = v1 regRowid = v1 - *(*int32)(unsafe.Pointer(pParse + 60)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + int32(1) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + int32(1) if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { regRowid++ (*TParse)(unsafe.Pointer(pParse)).FnMem++ @@ -109881,44 +110212,28 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin if !(i < (*TIdList)(unsafe.Pointer(pColumn)).FnId) { break } - zCName = (*(*TIdList_item)(unsafe.Pointer(pColumn + 8 + uintptr(i)*8))).FzName - hName = _sqlite3StrIHash(tls, zCName) - j = 0 - for { - if !(j < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break + j = _sqlite3ColumnIndex(tls, pTab, (*(*TIdList_item)(unsafe.Pointer(pColumn + 8 + uintptr(i)*8))).FzName) + if j >= 0 { + if *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) == 0 { + *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) = i + int32(1) } - if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FhName) != libc.Int32FromUint8(hName) { - goto _3 + if i != j { + bIdListInOrder = uint8(0) } - if _sqlite3StrICmp(tls, zCName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName) == 0 { - if *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) == 0 { - *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) = i + int32(1) - } - if i != j { - bIdListInOrder = uint8(0) - } - if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { - ipkColumn = i - } - if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FcolFlags)&(libc.Int32FromInt32(COLFLAG_STORED)|libc.Int32FromInt32(COLFLAG_VIRTUAL)) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16230, libc.VaList(bp+128, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName)) - goto insert_cleanup - } - break + if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { + ipkColumn = i } - goto _3 - _3: - ; - j++ - } - if j >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { + if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FcolFlags)&(libc.Int32FromInt32(COLFLAG_STORED)|libc.Int32FromInt32(COLFLAG_VIRTUAL)) != 0 { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16302, libc.VaList(bp+128, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName)) + goto insert_cleanup + } + } else { if _sqlite3IsRowid(tls, (*(*TIdList_item)(unsafe.Pointer(pColumn + 8 + uintptr(i)*8))).FzName) != 0 && !(withoutRowid != 0) { ipkColumn = i bIdListInOrder = uint8(0) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16271, libc.VaList(bp+128, pTabList+8, (*(*TIdList_item)(unsafe.Pointer(pColumn + 8 + uintptr(i)*8))).FzName)) - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16343, libc.VaList(bp+128, pTabList+8, (*(*TIdList_item)(unsafe.Pointer(pColumn + 8 + uintptr(i)*8))).FzName)) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) goto insert_cleanup } } @@ -109940,31 +110255,31 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSDParm = (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn regFromSelect = (*TSubquery)(unsafe.Pointer(pSubq)).FregResult nColumn = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer((*TSubquery)(unsafe.Pointer(pSubq)).FpSelect)).FpEList)).FnExpr - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+16303, libc.VaList(bp+128, pItem)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+16375, libc.VaList(bp+128, pItem)) if bIdListInOrder != 0 && nColumn == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { regData = regFromSelect regRowid = regData - int32(1) if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { - v4 = int32(1) + v3 = int32(1) } else { - v4 = 0 + v3 = 0 } - regIns = regRowid - v4 + regIns = regRowid - v3 } } else { - v6 = pParse + 60 - *(*int32)(unsafe.Pointer(v6))++ - v5 = *(*int32)(unsafe.Pointer(v6)) /* Top of the co-routine */ - regYield = v5 + v5 = pParse + 64 + *(*int32)(unsafe.Pointer(v5))++ + v4 = *(*int32)(unsafe.Pointer(v5)) /* Top of the co-routine */ + regYield = v4 addrTop = _sqlite3VdbeCurrentAddr(tls, v) + int32(1) _sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), regYield, 0, addrTop) _sqlite3SelectDestInit(tls, bp+8, int32(SRT_Coroutine), regYield) if bIdListInOrder != 0 { - v7 = regData + v6 = regData } else { - v7 = 0 + v6 = 0 } - (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSdst = v7 + (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSdst = v6 (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FnSdst = int32((*TTable)(unsafe.Pointer(pTab)).FnCol) rc = _sqlite3Select(tls, pParse, pSelect, bp+8) regFromSelect = (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSdst @@ -109988,10 +110303,10 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin useTempTable = uint8(1) } if useTempTable != 0 { /* Label "L" */ - v9 = pParse + 56 - v8 = *(*int32)(unsafe.Pointer(v9)) - *(*int32)(unsafe.Pointer(v9))++ - srcTab = v8 + v8 = pParse + 60 + v7 = *(*int32)(unsafe.Pointer(v8)) + *(*int32)(unsafe.Pointer(v8))++ + srcTab = v7 regRec = _sqlite3GetTempReg(tls, pParse) regTempRowid = _sqlite3GetTempReg(tls, pParse) _sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), srcTab, nColumn) @@ -110032,8 +110347,8 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16))).FcolFlags)&int32(COLFLAG_GENERATED) != 0 { ipkColumn-- } - goto _10 - _10: + goto _9 + _9: ; i-- } @@ -110050,28 +110365,28 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16))).FcolFlags)&int32(COLFLAG_NOINSERT) != 0 { nHidden++ } - goto _11 - _11: + goto _10 + _10: ; i++ } } if nColumn != int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-nHidden { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16311, libc.VaList(bp+128, pTabList+8, int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16383, libc.VaList(bp+128, pTabList+8, int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup } } if pColumn != uintptr(0) && nColumn != (*TIdList)(unsafe.Pointer(pColumn)).FnId { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16363, libc.VaList(bp+128, nColumn, (*TIdList)(unsafe.Pointer(pColumn)).FnId)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16435, libc.VaList(bp+128, nColumn, (*TIdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup } /* Initialize the count of rows to be inserted */ if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32)) != uint64(0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) && !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) { - v13 = pParse + 60 - *(*int32)(unsafe.Pointer(v13))++ - v12 = *(*int32)(unsafe.Pointer(v13)) - regRowCount = v12 + v12 = pParse + 64 + *(*int32)(unsafe.Pointer(v12))++ + v11 = *(*int32)(unsafe.Pointer(v12)) + regRowCount = v11 _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regRowCount) } /* If this is not a view, open the table and and all indices */ @@ -110087,29 +110402,29 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin if !(i < nIdx) { break } - v16 = pParse + 60 - *(*int32)(unsafe.Pointer(v16))++ - v15 = *(*int32)(unsafe.Pointer(v16)) - *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v15 - *(*int32)(unsafe.Pointer(pParse + 60)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) - goto _14 - _14: + v15 = pParse + 64 + *(*int32)(unsafe.Pointer(v15))++ + v14 = *(*int32)(unsafe.Pointer(v15)) + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v14 + *(*int32)(unsafe.Pointer(pParse + 64)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) + goto _13 + _13: ; pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext i++ } - v18 = pParse + 60 - *(*int32)(unsafe.Pointer(v18))++ - v17 = *(*int32)(unsafe.Pointer(v18)) - *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v17 /* Register to store the table record */ + v17 = pParse + 64 + *(*int32)(unsafe.Pointer(v17))++ + v16 = *(*int32)(unsafe.Pointer(v17)) + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v16 /* Register to store the table record */ } if pUpsert != 0 { if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16388, libc.VaList(bp+128, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16460, libc.VaList(bp+128, (*TTable)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16434, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16506, 0) goto insert_cleanup } if _sqlite3HasExplicitNulls(tls, pParse, (*TUpsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) != 0 { @@ -110153,9 +110468,9 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin ** goto C ** D: ... */ - v19 = _sqlite3VdbeAddOp1(tls, v, int32(OP_Yield), (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSDParm) - addrCont = v19 - addrInsTop = v19 + v18 = _sqlite3VdbeAddOp1(tls, v, int32(OP_Yield), (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSDParm) + addrCont = v18 + addrInsTop = v18 if ipkColumn >= 0 { /* tag-20191021-001: If the INTEGER PRIMARY KEY is being generated by the ** SELECT, go ahead and copy the value into the rowid slot now, so that @@ -110184,18 +110499,18 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin ** using excess space. The file format definition requires this extra ** NULL - we cannot optimize further by skipping the column completely */ _sqlite3VdbeAddOp1(tls, v, int32(OP_SoftNull), iRegStore) - goto _20 + goto _19 } - v21 = uint32((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16))).FcolFlags) - colFlags = v21 - if v21&uint32(COLFLAG_NOINSERT) != uint32(0) { + v20 = uint32((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16))).FcolFlags) + colFlags = v20 + if v20&uint32(COLFLAG_NOINSERT) != uint32(0) { nHidden++ if colFlags&uint32(COLFLAG_VIRTUAL) != uint32(0) { /* Virtual columns do not participate in OP_MakeRecord. So back up ** iRegStore by one slot to compensate for the iRegStore++ in the ** outer for() loop */ iRegStore-- - goto _20 + goto _19 } else { if colFlags&uint32(COLFLAG_STORED) != uint32(0) { /* Stored columns are computed later. But if there are BEFORE @@ -110205,13 +110520,13 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin if *(*int32)(unsafe.Pointer(bp + 48))&int32(TRIGGER_BEFORE) != 0 { _sqlite3VdbeAddOp1(tls, v, int32(OP_SoftNull), iRegStore) } - goto _20 + goto _19 } else { if pColumn == uintptr(0) { /* Hidden columns that are not explicitly named in the INSERT - ** get there default value */ + ** get their default value */ _sqlite3ExprCodeFactorable(tls, pParse, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16), iRegStore) - goto _20 + goto _19 } } } @@ -110222,14 +110537,14 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin /* A column not named in the insert column list gets its ** default value */ _sqlite3ExprCodeFactorable(tls, pParse, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16), iRegStore) - goto _20 + goto _19 } k = j - int32(1) } else { if nColumn == 0 { /* This is INSERT INTO ... DEFAULT VALUES. Load the default value. */ _sqlite3ExprCodeFactorable(tls, pParse, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16), iRegStore) - goto _20 + goto _19 } else { k = i - nHidden } @@ -110246,16 +110561,16 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin y = _sqlite3ExprCodeTarget(tls, pParse, pX, iRegStore) if y != iRegStore { if (*TExpr)(unsafe.Pointer(pX)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subquery)) != uint32(0) { - v22 = int32(OP_Copy) + v21 = int32(OP_Copy) } else { - v22 = int32(OP_SCopy) + v21 = int32(OP_SCopy) } - _sqlite3VdbeAddOp2(tls, v, v22, y, iRegStore) + _sqlite3VdbeAddOp2(tls, v, v21, y, iRegStore) } } } - goto _20 - _20: + goto _19 + _19: ; i++ iRegStore++ @@ -110366,11 +110681,11 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin _sqlite3VtabMakeWritable(tls, pParse, pTab) _sqlite3VdbeAddOp4(tls, v, int32(OP_VUpdate), int32(1), int32((*TTable)(unsafe.Pointer(pTab)).FnCol)+int32(2), regIns, pVTab, -int32(11)) if onError == int32(OE_Default) { - v23 = int32(OE_Abort) + v22 = int32(OE_Abort) } else { - v23 = onError + v22 = onError } - _sqlite3VdbeChangeP5(tls, v, libc.Uint16FromInt32(v23)) + _sqlite3VdbeChangeP5(tls, v, libc.Uint16FromInt32(v22)) _sqlite3MayAbort(tls, pParse) } else { *(*int32)(unsafe.Pointer(bp + 112)) = 0 /* True to use OPFLAG_SEEKRESULT */ @@ -110429,7 +110744,7 @@ insert_end: ** invoke the callback function. */ if regRowCount != 0 { - _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+16455) + _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+16527) } goto insert_cleanup insert_cleanup: @@ -110825,7 +111140,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt case int32(OE_Rollback): fallthrough case int32(OE_Fail): - zMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+12570, libc.VaList(bp+64, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) + zMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+12595, libc.VaList(bp+64, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)) _sqlite3VdbeAddOp3(tls, v, int32(OP_HaltIfNull), libc.Int32FromInt32(SQLITE_CONSTRAINT)|libc.Int32FromInt32(5)<<libc.Int32FromInt32(8), onError, iReg) _sqlite3VdbeAppendP4(tls, v, zMsg, -int32(6)) _sqlite3VdbeChangeP5(tls, v, uint16(P5_ConstraintNotNull)) @@ -110919,7 +111234,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt ** could happen in any order, but they are grouped up front for ** convenience. ** - ** 2018-08-14: Ticket https://www.sqlite.org/src/info/908f001483982c43 + ** 2018-08-14: Ticket https://sqlite.org/src/info/908f001483982c43 ** The order of constraints used to have OE_Update as (2) and OE_Abort ** and so forth as (1). But apparently PostgreSQL checks the OE_Update ** constraint before any others, so it had to be moved. @@ -111060,7 +111375,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt if regTrigCnt != 0 { /* Replace triggers might exist. Allocate the counter and ** initialize it to zero. */ - v8 = pParse + 60 + v8 = pParse + 64 *(*int32)(unsafe.Pointer(v8))++ v7 = *(*int32)(unsafe.Pointer(v8)) regTrigCnt = v7 @@ -111315,7 +111630,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) { break } - x1 = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) + x1 = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) _sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iThisCur, x1, regR+i) goto _12 _12: @@ -111957,11 +112272,11 @@ func _xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uin iDbSrc = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pSrc)).FpSchema) v = _sqlite3GetVdbe(tls, pParse) _sqlite3CodeVerifySchema(tls, pParse, iDbSrc) - v5 = pParse + 56 + v5 = pParse + 60 v4 = *(*int32)(unsafe.Pointer(v5)) *(*int32)(unsafe.Pointer(v5))++ iSrc = v4 - v7 = pParse + 56 + v7 = pParse + 60 v6 = *(*int32)(unsafe.Pointer(v7)) *(*int32)(unsafe.Pointer(v7))++ iDest = v6 @@ -112177,7 +112492,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Tsqlite3_c *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) /* The current SQL statement */ azCols = uintptr(0) /* True if callback data is initialized */ if !(_sqlite3SafetyCheckOk(tls, db) != 0) { - return _sqlite3MisuseError(tls, int32(137273)) + return _sqlite3MisuseError(tls, int32(138204)) } if zSql == uintptr(0) { zSql = __ccgo_ts + 1665 @@ -112608,6 +112923,7 @@ type Tsqlite3_api_routines1 = struct { Fstmt_explain uintptr Fget_clientdata uintptr Fset_clientdata uintptr + Fsetlk_timeout uintptr } type sqlite3_api_routines1 = Tsqlite3_api_routines1 @@ -112936,6 +113252,7 @@ func init() { *(*uintptr)(unsafe.Add(p, 2136)) = __ccgo_fp(Xsqlite3_stmt_explain) *(*uintptr)(unsafe.Add(p, 2144)) = __ccgo_fp(Xsqlite3_get_clientdata) *(*uintptr)(unsafe.Add(p, 2152)) = __ccgo_fp(Xsqlite3_set_clientdata) + *(*uintptr)(unsafe.Add(p, 2160)) = __ccgo_fp(Xsqlite3_setlk_timeout) } /* True if x is the directory separator character @@ -112980,14 +113297,14 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp */ if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtension) == uint64(0) { if pzErrMsg != 0 { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+12609, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+12634, 0) } return int32(SQLITE_ERROR) } if zProc != 0 { v1 = zProc } else { - v1 = __ccgo_ts + 16472 + v1 = __ccgo_ts + 16544 } zEntry = v1 /* tag-20210611-1. Some dlopen() implementations will segfault if given @@ -113012,7 +113329,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp if !(ii < libc.Int32FromUint64(libc.Uint64FromInt64(8)/libc.Uint64FromInt64(8)) && handle == uintptr(0)) { break } - zAltFile = Xsqlite3_mprintf(tls, __ccgo_ts+12570, libc.VaList(bp+16, zFile, _azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, __ccgo_ts+12595, libc.VaList(bp+16, zFile, _azEndings[ii])) if zAltFile == uintptr(0) { return int32(SQLITE_NOMEM) } @@ -113047,7 +113364,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp _sqlite3OsDlClose(tls, pVfs, handle) return int32(SQLITE_NOMEM) } - libc.Xmemcpy(tls, zAltEntry, __ccgo_ts+16495, uint64(8)) + libc.Xmemcpy(tls, zAltEntry, __ccgo_ts+16567, uint64(8)) iFile = ncFile - int32(1) for { if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == libc.Int32FromUint8('/'))) { @@ -113059,7 +113376,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp iFile-- } iFile++ - if Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), __ccgo_ts+16504, int32(3)) == 0 { + if Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), __ccgo_ts+16576, int32(3)) == 0 { iFile += int32(3) } iEntry = int32(8) @@ -113079,7 +113396,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp ; iFile++ } - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), __ccgo_ts+16508, uint64(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), __ccgo_ts+16580, uint64(6)) zEntry = zAltEntry xInit = _sqlite3OsDlSym(tls, pVfs, handle, zEntry) } @@ -113091,7 +113408,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp *(*uintptr)(unsafe.Pointer(pzErrMsg)) = v7 if *(*uintptr)(unsafe.Pointer(bp)) != 0 { /* zErrmsg would be NULL if not so */ - Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16514, libc.VaList(bp+16, zEntry, zFile)) + Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16586, libc.VaList(bp+16, zEntry, zFile)) _sqlite3OsDlError(tls, pVfs, libc.Int32FromUint64(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp))) } } @@ -113106,7 +113423,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp return SQLITE_OK } if pzErrMsg != 0 { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+16557, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+16629, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp))) _sqlite3OsDlClose(tls, pVfs, handle) @@ -113137,7 +113454,7 @@ extension_not_found: *(*uintptr)(unsafe.Pointer(pzErrMsg)) = v10 if *(*uintptr)(unsafe.Pointer(bp)) != 0 { /* zErrmsg would be NULL if not so */ - Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16589, libc.VaList(bp+16, int32(FILENAME_MAX), zFile)) + Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16661, libc.VaList(bp+16, int32(FILENAME_MAX), zFile)) _sqlite3OsDlError(tls, pVfs, libc.Int32FromUint64(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp))) } } @@ -113146,7 +113463,7 @@ extension_not_found: /* Shared library endings to try if zFile cannot be loaded as written */ var _azEndings = [1]uintptr{ - 0: __ccgo_ts + 16469, + 0: __ccgo_ts + 16541, } func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) (r int32) { @@ -113379,7 +113696,7 @@ func _sqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { rc = v2 } if v3 && v2 != 0 { - _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+16626, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) + _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+16698, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -113433,63 +113750,63 @@ func _sqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { // ** result column is different from the name of the pragma // */ var _pragCName = [57]uintptr{ - 0: __ccgo_ts + 5564, - 1: __ccgo_ts + 16665, - 2: __ccgo_ts + 9247, - 3: __ccgo_ts + 16669, - 4: __ccgo_ts + 16674, - 5: __ccgo_ts + 16677, - 6: __ccgo_ts + 16687, - 7: __ccgo_ts + 16697, - 8: __ccgo_ts + 16703, - 9: __ccgo_ts + 16707, - 10: __ccgo_ts + 16712, - 11: __ccgo_ts + 16717, - 12: __ccgo_ts + 16725, - 13: __ccgo_ts + 16736, - 14: __ccgo_ts + 16739, - 15: __ccgo_ts + 16707, - 16: __ccgo_ts + 16746, - 17: __ccgo_ts + 16712, - 18: __ccgo_ts + 16754, - 19: __ccgo_ts + 16758, - 20: __ccgo_ts + 16763, - 21: __ccgo_ts + 16769, - 22: __ccgo_ts + 16707, - 23: __ccgo_ts + 16712, - 24: __ccgo_ts + 16776, - 25: __ccgo_ts + 16781, - 26: __ccgo_ts + 16784, - 27: __ccgo_ts + 16791, - 28: __ccgo_ts + 16703, - 29: __ccgo_ts + 16707, - 30: __ccgo_ts + 16797, - 31: __ccgo_ts + 16802, - 32: __ccgo_ts + 16807, - 33: __ccgo_ts + 16665, - 34: __ccgo_ts + 16707, - 35: __ccgo_ts + 16811, - 36: __ccgo_ts + 16818, - 37: __ccgo_ts + 16825, - 38: __ccgo_ts + 11986, - 39: __ccgo_ts + 11982, - 40: __ccgo_ts + 16833, - 41: __ccgo_ts + 16838, - 42: __ccgo_ts + 16843, - 43: __ccgo_ts + 9247, - 44: __ccgo_ts + 16848, - 45: __ccgo_ts + 5567, - 46: __ccgo_ts + 16854, - 47: __ccgo_ts + 16859, - 48: __ccgo_ts + 16050, - 49: __ccgo_ts + 16864, - 50: __ccgo_ts + 16665, - 51: __ccgo_ts + 16707, - 52: __ccgo_ts + 16877, - 53: __ccgo_ts + 16882, - 54: __ccgo_ts + 16891, - 55: __ccgo_ts + 16898, - 56: __ccgo_ts + 16909, + 0: __ccgo_ts + 5590, + 1: __ccgo_ts + 16737, + 2: __ccgo_ts + 9272, + 3: __ccgo_ts + 16741, + 4: __ccgo_ts + 16746, + 5: __ccgo_ts + 16749, + 6: __ccgo_ts + 16759, + 7: __ccgo_ts + 16769, + 8: __ccgo_ts + 16775, + 9: __ccgo_ts + 16779, + 10: __ccgo_ts + 16784, + 11: __ccgo_ts + 16789, + 12: __ccgo_ts + 16797, + 13: __ccgo_ts + 16808, + 14: __ccgo_ts + 16811, + 15: __ccgo_ts + 16779, + 16: __ccgo_ts + 16818, + 17: __ccgo_ts + 16784, + 18: __ccgo_ts + 16826, + 19: __ccgo_ts + 16830, + 20: __ccgo_ts + 16835, + 21: __ccgo_ts + 16841, + 22: __ccgo_ts + 16779, + 23: __ccgo_ts + 16784, + 24: __ccgo_ts + 16848, + 25: __ccgo_ts + 16853, + 26: __ccgo_ts + 16856, + 27: __ccgo_ts + 16863, + 28: __ccgo_ts + 16775, + 29: __ccgo_ts + 16779, + 30: __ccgo_ts + 16869, + 31: __ccgo_ts + 16874, + 32: __ccgo_ts + 16879, + 33: __ccgo_ts + 16737, + 34: __ccgo_ts + 16779, + 35: __ccgo_ts + 16883, + 36: __ccgo_ts + 16890, + 37: __ccgo_ts + 16897, + 38: __ccgo_ts + 12011, + 39: __ccgo_ts + 12007, + 40: __ccgo_ts + 16905, + 41: __ccgo_ts + 16910, + 42: __ccgo_ts + 16915, + 43: __ccgo_ts + 9272, + 44: __ccgo_ts + 16920, + 45: __ccgo_ts + 5593, + 46: __ccgo_ts + 16926, + 47: __ccgo_ts + 16931, + 48: __ccgo_ts + 16122, + 49: __ccgo_ts + 16936, + 50: __ccgo_ts + 16737, + 51: __ccgo_ts + 16779, + 52: __ccgo_ts + 16949, + 53: __ccgo_ts + 16954, + 54: __ccgo_ts + 16963, + 55: __ccgo_ts + 16970, + 56: __ccgo_ts + 16981, } // C documentation @@ -113508,191 +113825,191 @@ type PragmaName = TPragmaName var _aPragmaName = [66]TPragmaName{ 0: { - FzName: __ccgo_ts + 16917, + FzName: __ccgo_ts + 16989, FePragTyp: uint8(PragTyp_ANALYSIS_LIMIT), FmPragFlg: uint8(PragFlg_Result0), }, 1: { - FzName: __ccgo_ts + 16932, + FzName: __ccgo_ts + 17004, FePragTyp: uint8(PragTyp_HEADER_VALUE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NoColumns1) | libc.Int32FromInt32(PragFlg_Result0)), FiArg: uint64(BTREE_APPLICATION_ID), }, 2: { - FzName: __ccgo_ts + 16947, + FzName: __ccgo_ts + 17019, FePragTyp: uint8(PragTyp_AUTO_VACUUM), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)), }, 3: { - FzName: __ccgo_ts + 16959, + FzName: __ccgo_ts + 17031, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_AutoIndex), }, 4: { - FzName: __ccgo_ts + 16975, + FzName: __ccgo_ts + 17047, FePragTyp: uint8(PragTyp_BUSY_TIMEOUT), FmPragFlg: uint8(PragFlg_Result0), FiPragCName: uint8(56), FnPragCName: uint8(1), }, 5: { - FzName: __ccgo_ts + 16898, + FzName: __ccgo_ts + 16970, FePragTyp: uint8(PragTyp_CACHE_SIZE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)), }, 6: { - FzName: __ccgo_ts + 16988, + FzName: __ccgo_ts + 17060, FePragTyp: uint8(PragTyp_CACHE_SPILL), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)), }, 7: { - FzName: __ccgo_ts + 17000, + FzName: __ccgo_ts + 17072, FePragTyp: uint8(PragTyp_CASE_SENSITIVE_LIKE), FmPragFlg: uint8(PragFlg_NoColumns), }, 8: { - FzName: __ccgo_ts + 17020, + FzName: __ccgo_ts + 17092, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_CellSizeCk), }, 9: { - FzName: __ccgo_ts + 17036, + FzName: __ccgo_ts + 17108, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_CkptFullFSync), }, 10: { - FzName: __ccgo_ts + 17057, + FzName: __ccgo_ts + 17129, FePragTyp: uint8(PragTyp_COLLATION_LIST), FmPragFlg: uint8(PragFlg_Result0), FiPragCName: uint8(33), FnPragCName: uint8(2), }, 11: { - FzName: __ccgo_ts + 17072, + FzName: __ccgo_ts + 17144, FePragTyp: uint8(PragTyp_COMPILE_OPTIONS), FmPragFlg: uint8(PragFlg_Result0), }, 12: { - FzName: __ccgo_ts + 17088, + FzName: __ccgo_ts + 17160, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: libc.Uint64FromInt32(libc.Int32FromInt32(0x00001)) << libc.Int32FromInt32(32), }, 13: { - FzName: __ccgo_ts + 17102, + FzName: __ccgo_ts + 17174, FePragTyp: uint8(PragTyp_HEADER_VALUE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_ReadOnly) | libc.Int32FromInt32(PragFlg_Result0)), FiArg: uint64(BTREE_DATA_VERSION), }, 14: { - FzName: __ccgo_ts + 17115, + FzName: __ccgo_ts + 17187, FePragTyp: uint8(PragTyp_DATABASE_LIST), FmPragFlg: uint8(PragFlg_Result0), FiPragCName: uint8(50), FnPragCName: uint8(3), }, 15: { - FzName: __ccgo_ts + 17129, + FzName: __ccgo_ts + 17201, FePragTyp: uint8(PragTyp_DEFAULT_CACHE_SIZE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiPragCName: uint8(55), FnPragCName: uint8(1), }, 16: { - FzName: __ccgo_ts + 17148, + FzName: __ccgo_ts + 17220, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_DeferFKs), }, 17: { - FzName: __ccgo_ts + 17167, + FzName: __ccgo_ts + 17239, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_NullCallback), }, 18: { - FzName: __ccgo_ts + 17190, + FzName: __ccgo_ts + 17262, FePragTyp: uint8(PragTyp_ENCODING), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), }, 19: { - FzName: __ccgo_ts + 17199, + FzName: __ccgo_ts + 17271, FePragTyp: uint8(PragTyp_FOREIGN_KEY_CHECK), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), FiPragCName: uint8(43), FnPragCName: uint8(4), }, 20: { - FzName: __ccgo_ts + 17217, + FzName: __ccgo_ts + 17289, FePragTyp: uint8(PragTyp_FOREIGN_KEY_LIST), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), FnPragCName: uint8(8), }, 21: { - FzName: __ccgo_ts + 17234, + FzName: __ccgo_ts + 17306, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_ForeignKeys), }, 22: { - FzName: __ccgo_ts + 17247, + FzName: __ccgo_ts + 17319, FePragTyp: uint8(PragTyp_HEADER_VALUE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_ReadOnly) | libc.Int32FromInt32(PragFlg_Result0)), }, 23: { - FzName: __ccgo_ts + 17262, + FzName: __ccgo_ts + 17334, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_FullColNames), }, 24: { - FzName: __ccgo_ts + 17280, + FzName: __ccgo_ts + 17352, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_FullFSync), }, 25: { - FzName: __ccgo_ts + 17290, + FzName: __ccgo_ts + 17362, FePragTyp: uint8(PragTyp_FUNCTION_LIST), FmPragFlg: uint8(PragFlg_Result0), FiPragCName: uint8(15), FnPragCName: uint8(6), }, 26: { - FzName: __ccgo_ts + 17304, + FzName: __ccgo_ts + 17376, FePragTyp: uint8(PragTyp_HARD_HEAP_LIMIT), FmPragFlg: uint8(PragFlg_Result0), }, 27: { - FzName: __ccgo_ts + 17320, + FzName: __ccgo_ts + 17392, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_IgnoreChecks), }, 28: { - FzName: __ccgo_ts + 17345, + FzName: __ccgo_ts + 17417, FePragTyp: uint8(PragTyp_INCREMENTAL_VACUUM), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_NoColumns)), }, 29: { - FzName: __ccgo_ts + 17364, + FzName: __ccgo_ts + 17436, FePragTyp: uint8(PragTyp_INDEX_INFO), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), FiPragCName: uint8(27), FnPragCName: uint8(3), }, 30: { - FzName: __ccgo_ts + 17375, + FzName: __ccgo_ts + 17447, FePragTyp: uint8(PragTyp_INDEX_LIST), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), FiPragCName: uint8(33), FnPragCName: uint8(5), }, 31: { - FzName: __ccgo_ts + 17386, + FzName: __ccgo_ts + 17458, FePragTyp: uint8(PragTyp_INDEX_INFO), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), FiPragCName: uint8(27), @@ -113700,146 +114017,146 @@ var _aPragmaName = [66]TPragmaName{ FiArg: uint64(1), }, 32: { - FzName: __ccgo_ts + 17398, + FzName: __ccgo_ts + 17470, FePragTyp: uint8(PragTyp_INTEGRITY_CHECK), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), }, 33: { - FzName: __ccgo_ts + 17414, + FzName: __ccgo_ts + 17486, FePragTyp: uint8(PragTyp_JOURNAL_MODE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)), }, 34: { - FzName: __ccgo_ts + 17427, + FzName: __ccgo_ts + 17499, FePragTyp: uint8(PragTyp_JOURNAL_SIZE_LIMIT), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)), }, 35: { - FzName: __ccgo_ts + 17446, + FzName: __ccgo_ts + 17518, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_LegacyAlter), }, 36: { - FzName: __ccgo_ts + 17465, + FzName: __ccgo_ts + 17537, FePragTyp: uint8(PragTyp_LOCKING_MODE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)), }, 37: { - FzName: __ccgo_ts + 17478, + FzName: __ccgo_ts + 17550, FePragTyp: uint8(PragTyp_PAGE_COUNT), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)), }, 38: { - FzName: __ccgo_ts + 17493, + FzName: __ccgo_ts + 17565, FePragTyp: uint8(PragTyp_MMAP_SIZE), }, 39: { - FzName: __ccgo_ts + 17503, + FzName: __ccgo_ts + 17575, FePragTyp: uint8(PragTyp_MODULE_LIST), FmPragFlg: uint8(PragFlg_Result0), FiPragCName: uint8(9), FnPragCName: uint8(1), }, 40: { - FzName: __ccgo_ts + 17515, + FzName: __ccgo_ts + 17587, FePragTyp: uint8(PragTyp_OPTIMIZE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_NeedSchema)), }, 41: { - FzName: __ccgo_ts + 17524, + FzName: __ccgo_ts + 17596, FePragTyp: uint8(PragTyp_PAGE_COUNT), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)), }, 42: { - FzName: __ccgo_ts + 17535, + FzName: __ccgo_ts + 17607, FePragTyp: uint8(PragTyp_PAGE_SIZE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)), }, 43: { - FzName: __ccgo_ts + 17545, + FzName: __ccgo_ts + 17617, FePragTyp: uint8(PragTyp_PRAGMA_LIST), FmPragFlg: uint8(PragFlg_Result0), FiPragCName: uint8(9), FnPragCName: uint8(1), }, 44: { - FzName: __ccgo_ts + 17557, + FzName: __ccgo_ts + 17629, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_QueryOnly), }, 45: { - FzName: __ccgo_ts + 17568, + FzName: __ccgo_ts + 17640, FePragTyp: uint8(PragTyp_INTEGRITY_CHECK), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), }, 46: { - FzName: __ccgo_ts + 17580, + FzName: __ccgo_ts + 17652, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: libc.Uint64FromInt32(libc.Int32FromInt32(0x00004)) << libc.Int32FromInt32(32), }, 47: { - FzName: __ccgo_ts + 17597, + FzName: __ccgo_ts + 17669, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_RecTriggers), }, 48: { - FzName: __ccgo_ts + 17616, + FzName: __ccgo_ts + 17688, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_ReverseOrder), }, 49: { - FzName: __ccgo_ts + 17642, + FzName: __ccgo_ts + 17714, FePragTyp: uint8(PragTyp_HEADER_VALUE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NoColumns1) | libc.Int32FromInt32(PragFlg_Result0)), FiArg: uint64(BTREE_SCHEMA_VERSION), }, 50: { - FzName: __ccgo_ts + 17657, + FzName: __ccgo_ts + 17729, FePragTyp: uint8(PragTyp_SECURE_DELETE), FmPragFlg: uint8(PragFlg_Result0), }, 51: { - FzName: __ccgo_ts + 17671, + FzName: __ccgo_ts + 17743, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_ShortColNames), }, 52: { - FzName: __ccgo_ts + 17690, + FzName: __ccgo_ts + 17762, FePragTyp: uint8(PragTyp_SHRINK_MEMORY), FmPragFlg: uint8(PragFlg_NoColumns), }, 53: { - FzName: __ccgo_ts + 17704, + FzName: __ccgo_ts + 17776, FePragTyp: uint8(PragTyp_SOFT_HEAP_LIMIT), FmPragFlg: uint8(PragFlg_Result0), }, 54: { - FzName: __ccgo_ts + 17720, + FzName: __ccgo_ts + 17792, FePragTyp: uint8(PragTyp_SYNCHRONOUS), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)), }, 55: { - FzName: __ccgo_ts + 17732, + FzName: __ccgo_ts + 17804, FePragTyp: uint8(PragTyp_TABLE_INFO), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), FiPragCName: uint8(8), FnPragCName: uint8(6), }, 56: { - FzName: __ccgo_ts + 17743, + FzName: __ccgo_ts + 17815, FePragTyp: uint8(PragTyp_TABLE_LIST), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1)), FiPragCName: uint8(21), FnPragCName: uint8(6), }, 57: { - FzName: __ccgo_ts + 17754, + FzName: __ccgo_ts + 17826, FePragTyp: uint8(PragTyp_TABLE_INFO), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)), FiPragCName: uint8(8), @@ -113847,45 +114164,45 @@ var _aPragmaName = [66]TPragmaName{ FiArg: uint64(1), }, 58: { - FzName: __ccgo_ts + 17766, + FzName: __ccgo_ts + 17838, FePragTyp: uint8(PragTyp_TEMP_STORE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), }, 59: { - FzName: __ccgo_ts + 17777, + FzName: __ccgo_ts + 17849, FePragTyp: uint8(PragTyp_TEMP_STORE_DIRECTORY), FmPragFlg: uint8(PragFlg_NoColumns1), }, 60: { - FzName: __ccgo_ts + 17798, + FzName: __ccgo_ts + 17870, FePragTyp: uint8(PragTyp_THREADS), FmPragFlg: uint8(PragFlg_Result0), }, 61: { - FzName: __ccgo_ts + 17806, + FzName: __ccgo_ts + 17878, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: uint64(SQLITE_TrustedSchema), }, 62: { - FzName: __ccgo_ts + 17821, + FzName: __ccgo_ts + 17893, FePragTyp: uint8(PragTyp_HEADER_VALUE), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NoColumns1) | libc.Int32FromInt32(PragFlg_Result0)), FiArg: uint64(BTREE_USER_VERSION), }, 63: { - FzName: __ccgo_ts + 17834, + FzName: __ccgo_ts + 17906, FePragTyp: uint8(PragTyp_WAL_AUTOCHECKPOINT), }, 64: { - FzName: __ccgo_ts + 17853, + FzName: __ccgo_ts + 17925, FePragTyp: uint8(PragTyp_WAL_CHECKPOINT), FmPragFlg: uint8(PragFlg_NeedSchema), FiPragCName: uint8(47), FnPragCName: uint8(3), }, 65: { - FzName: __ccgo_ts + 17868, + FzName: __ccgo_ts + 17940, FePragTyp: uint8(PragTyp_FLAG), FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)), FiArg: libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_WriteSchema) | libc.Int32FromInt32(SQLITE_NoSchemaError)), @@ -113903,7 +114220,7 @@ var _aPragmaName = [66]TPragmaName{ ** the following macro or to the actual analysis_limit if it is non-zero, ** in order to prevent PRAGMA optimize from running for too long. ** -** The value of 2000 is chosen emperically so that the worst-case run-time +** The value of 2000 is chosen empirically so that the worst-case run-time ** for PRAGMA optimize does not exceed 100 milliseconds against a variety ** of test databases on a RaspberryPI-4 compiled using -Os and without ** -DSQLITE_DEBUG. Of course, your mileage may vary. For the purpose of @@ -114011,10 +114328,10 @@ func _sqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt Tu8) (r Tu8) { // */ func _getLockingMode(tls *libc.TLS, z uintptr) (r int32) { if z != 0 { - if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17884) { + if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17956) { return int32(PAGER_LOCKINGMODE_EXCLUSIVE) } - if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17894) { + if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17966) { return PAGER_LOCKINGMODE_NORMAL } } @@ -114032,13 +114349,13 @@ func _getLockingMode(tls *libc.TLS, z uintptr) (r int32) { func _getAutoVacuum(tls *libc.TLS, z uintptr) (r int32) { var i, v1 int32 _, _ = i, v1 - if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+8407) { + if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+8432) { return BTREE_AUTOVACUUM_NONE } - if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17901) { + if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17973) { return int32(BTREE_AUTOVACUUM_FULL) } - if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17906) { + if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17978) { return int32(BTREE_AUTOVACUUM_INCR) } i = _sqlite3Atoi(tls, z) @@ -114061,10 +114378,10 @@ func _getTempStore(tls *libc.TLS, z uintptr) (r int32) { if int32(*(*int8)(unsafe.Pointer(z))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(z))) <= int32('2') { return int32(*(*int8)(unsafe.Pointer(z))) - int32('0') } else { - if _sqlite3StrICmp(tls, z, __ccgo_ts+16877) == 0 { + if _sqlite3StrICmp(tls, z, __ccgo_ts+16949) == 0 { return int32(1) } else { - if _sqlite3StrICmp(tls, z, __ccgo_ts+17918) == 0 { + if _sqlite3StrICmp(tls, z, __ccgo_ts+17990) == 0 { return int32(2) } else { return 0 @@ -114086,7 +114403,7 @@ func _invalidateTempStorage(tls *libc.TLS, pParse uintptr) (r int32) { db = (*TParse)(unsafe.Pointer(pParse)).Fdb if (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpBt != uintptr(0) { if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) || _sqlite3BtreeTxnState(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpBt) != SQLITE_TXN_NONE { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+17925, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+17997, 0) return int32(SQLITE_ERROR) } _sqlite3BtreeClose(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpBt) @@ -114216,15 +114533,15 @@ func _actionName(tls *libc.TLS, action Tu8) (r uintptr) { _ = zName switch libc.Int32FromUint8(action) { case int32(OE_SetNull): - zName = __ccgo_ts + 17987 + zName = __ccgo_ts + 18059 case int32(OE_SetDflt): - zName = __ccgo_ts + 17996 + zName = __ccgo_ts + 18068 case int32(OE_Cascade): - zName = __ccgo_ts + 18008 + zName = __ccgo_ts + 18080 case int32(OE_Restrict): - zName = __ccgo_ts + 18016 + zName = __ccgo_ts + 18088 default: - zName = __ccgo_ts + 18025 + zName = __ccgo_ts + 18097 break } return zName @@ -114245,12 +114562,12 @@ func _sqlite3JournalModename(tls *libc.TLS, eMode int32) (r uintptr) { } var _azModeName = [6]uintptr{ - 0: __ccgo_ts + 18035, - 1: __ccgo_ts + 18042, - 2: __ccgo_ts + 18050, - 3: __ccgo_ts + 18054, - 4: __ccgo_ts + 17918, - 5: __ccgo_ts + 18063, + 0: __ccgo_ts + 18107, + 1: __ccgo_ts + 18114, + 2: __ccgo_ts + 18122, + 3: __ccgo_ts + 18126, + 4: __ccgo_ts + 17990, + 5: __ccgo_ts + 18135, } // C documentation @@ -114312,15 +114629,15 @@ func _pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, s goto _1 } if (*TFuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = __ccgo_ts + 18088 + zType = __ccgo_ts + 18160 } else { if (*TFuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = __ccgo_ts + 18090 + zType = __ccgo_ts + 18162 } else { - zType = __ccgo_ts + 7806 + zType = __ccgo_ts + 7831 } } - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18092, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, _azEnc[(*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_ENCMASK)], int32((*TFuncDef)(unsafe.Pointer(p)).FnArg), (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&mask^uint32(SQLITE_INNOCUOUS))) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18164, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, _azEnc[(*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_ENCMASK)], int32((*TFuncDef)(unsafe.Pointer(p)).FnArg), (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&mask^uint32(SQLITE_INNOCUOUS))) goto _1 _1: ; @@ -114329,9 +114646,9 @@ func _pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, s } var _azEnc = [4]uintptr{ - 1: __ccgo_ts + 18067, - 2: __ccgo_ts + 18072, - 3: __ccgo_ts + 18080, + 1: __ccgo_ts + 18139, + 2: __ccgo_ts + 18144, + 3: __ccgo_ts + 18152, } // C documentation @@ -114430,7 +114747,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p return } if minusFlag != 0 { - zRight = _sqlite3MPrintf(tls, db, __ccgo_ts+18099, libc.VaList(bp+176, pValue)) + zRight = _sqlite3MPrintf(tls, db, __ccgo_ts+18171, libc.VaList(bp+176, pValue)) } else { zRight = _sqlite3NameFromToken(tls, db, pValue) } @@ -114473,7 +114790,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } if rc != int32(SQLITE_NOTFOUND) { if (*(*[4]uintptr)(unsafe.Pointer(bp + 8)))[0] != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3862, libc.VaList(bp+176, (*(*[4]uintptr)(unsafe.Pointer(bp + 8)))[0])) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3888, libc.VaList(bp+176, (*(*[4]uintptr)(unsafe.Pointer(bp + 8)))[0])) Xsqlite3_free(tls, (*(*[4]uintptr)(unsafe.Pointer(bp + 8)))[0]) } (*TParse)(unsafe.Pointer(pParse)).FnErr++ @@ -114518,7 +114835,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p case int32(PragTyp_DEFAULT_CACHE_SIZE): _sqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0) { - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(2) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(2) aOp = _sqlite3VdbeAddOpList(tls, v, libc.Int32FromUint64(libc.Uint64FromInt64(36)/libc.Uint64FromInt64(4)), uintptr(unsafe.Pointer(&_getCacheSize)), _iLn3) if 0 != 0 { break @@ -114577,7 +114894,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p pBt1 = (*TDb)(unsafe.Pointer(pDb)).FpBt b = -int32(1) if zRight != 0 { - if Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18103) == 0 { + if Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18175) == 0 { b = int32(2) } else { b = libc.Int32FromUint8(_sqlite3GetBoolean(tls, zRight, uint8(0))) @@ -114620,7 +114937,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p case int32(PragTyp_PAGE_COUNT): *(*Ti64)(unsafe.Pointer(bp + 40)) = 0 _sqlite3CodeVerifySchema(tls, pParse, iDb) - v5 = pParse + 60 + v5 = pParse + 64 *(*int32)(unsafe.Pointer(v5))++ v4 = *(*int32)(unsafe.Pointer(v5)) iReg = v4 @@ -114648,7 +114965,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p */ fallthrough case int32(PragTyp_LOCKING_MODE): - zRet = __ccgo_ts + 17894 + zRet = __ccgo_ts + 17966 eMode = _getLockingMode(tls, zRight) if (*TToken)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -int32(1) { /* Simple "PRAGMA locking_mode;" statement. This is a query for @@ -114676,7 +114993,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p eMode = _sqlite3PagerLockingMode(tls, pPager, eMode) } if eMode == int32(PAGER_LOCKINGMODE_EXCLUSIVE) { - zRet = __ccgo_ts + 17884 + zRet = __ccgo_ts + 17956 } _returnSingleText(tls, v, zRet) break @@ -114966,7 +115283,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if *(*int8)(unsafe.Pointer(zRight)) != 0 { rc = _sqlite3OsAccess(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpVfs, zRight, int32(SQLITE_ACCESS_READWRITE), bp+72) if rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 72)) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18108, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18180, 0) Xsqlite3_mutex_leave(tls, _sqlite3MutexAlloc(tls, int32(SQLITE_MUTEX_STATIC_VFS1))) goto pragma_out } @@ -114976,7 +115293,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } Xsqlite3_free(tls, Xsqlite3_temp_directory) if *(*int8)(unsafe.Pointer(zRight)) != 0 { - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+176, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+176, zRight)) } else { Xsqlite3_temp_directory = uintptr(0) } @@ -114998,7 +115315,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p _returnSingleInt(tls, v, int64(libc.Int32FromUint8((*TDb)(unsafe.Pointer(pDb)).Fsafety_level)-int32(1))) } else { if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18133, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18205, 0) } else { if iDb != int32(1) { iLevel = (libc.Int32FromUint8(_getSafetyLevel(tls, zRight, 0, uint8(1))) + int32(1)) & int32(PAGER_SYNCHRONOUS_MASK) @@ -115030,8 +115347,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p *(*Tu64)(unsafe.Pointer(db + 48)) &= ^mask if mask == uint64(SQLITE_DeferFKs) { (*Tsqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = 0 + (*Tsqlite3)(unsafe.Pointer(db)).FnDeferredCons = 0 } - if mask&uint64(SQLITE_WriteSchema) != uint64(0) && Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18186) == 0 { + if mask&uint64(SQLITE_WriteSchema) != uint64(0) && Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18258) == 0 { /* IMP: R-60817-01178 If the argument is "RESET" then schema ** writing is disabled (as with "PRAGMA writable_schema=OFF") and, ** in addition, the schema is reloaded. */ @@ -115111,9 +115429,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } pColExpr = _sqlite3ColumnExpr(tls, pTab, pCol) if (*TPragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - v14 = __ccgo_ts + 18192 + v14 = __ccgo_ts + 18264 } else { - v14 = __ccgo_ts + 18200 + v14 = __ccgo_ts + 18272 } if int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { v15 = int32(1) @@ -115184,7 +115502,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } pTab1 = (*THashElem)(unsafe.Pointer(k1)).Fdata if int32((*TTable)(unsafe.Pointer(pTab1)).FnCol) == 0 { - zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18207, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab1)).FzName)) + zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18279, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab1)).FzName)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 80)) = uintptr(0) Xsqlite3_prepare_v3(tls, db, zSql, -int32(1), uint32(SQLITE_PREPARE_DONT_LOG), bp+80, uintptr(0)) @@ -115214,19 +115532,19 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p goto _20 } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab2)).FeTabType) == int32(TABTYP_VIEW) { - zType = __ccgo_ts + 10985 + zType = __ccgo_ts + 11010 } else { if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab2)).FeTabType) == int32(TABTYP_VTAB) { - zType = __ccgo_ts + 13233 + zType = __ccgo_ts + 13258 } else { if (*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_Shadow) != 0 { - zType = __ccgo_ts + 18223 + zType = __ccgo_ts + 18295 } else { - zType = __ccgo_ts + 9247 + zType = __ccgo_ts + 9272 } } } - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18230, libc.VaList(bp+176, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(ii4)*32))).FzDbSName, _sqlite3PreferredTableName(tls, (*TTable)(unsafe.Pointer(pTab2)).FzName), zType, int32((*TTable)(unsafe.Pointer(pTab2)).FnCol), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_WithoutRowid) != uint32(0)), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_Strict) != uint32(0)))) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18302, libc.VaList(bp+176, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(ii4)*32))).FzDbSName, _sqlite3PreferredTableName(tls, (*TTable)(unsafe.Pointer(pTab2)).FzName), zType, int32((*TTable)(unsafe.Pointer(pTab2)).FnCol), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_WithoutRowid) != uint32(0)), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_Strict) != uint32(0)))) goto _20 _20: ; @@ -115273,9 +115591,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } else { v22 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab3)).FaCol + uintptr(cnum)*16))).FzCnName } - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18237, libc.VaList(bp+176, i1, int32(cnum), v22)) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18309, libc.VaList(bp+176, i1, int32(cnum), v22)) if (*TPragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - _sqlite3VdbeMultiLoad(tls, v, int32(4), __ccgo_ts+18242, libc.VaList(bp+176, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.BoolInt32(i1 < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol)))) + _sqlite3VdbeMultiLoad(tls, v, int32(4), __ccgo_ts+18314, libc.VaList(bp+176, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.BoolInt32(i1 < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol)))) } _sqlite3VdbeAddOp2(tls, v, int32(OP_ResultRow), int32(1), (*TParse)(unsafe.Pointer(pParse)).FnMem) goto _21 @@ -115299,11 +115617,11 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p break } azOrigin = [3]uintptr{ - 0: __ccgo_ts + 18247, - 1: __ccgo_ts + 18249, - 2: __ccgo_ts + 16736, + 0: __ccgo_ts + 18319, + 1: __ccgo_ts + 18321, + 2: __ccgo_ts + 16808, } - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18251, libc.VaList(bp+176, i2, (*TIndex)(unsafe.Pointer(pIdx1)).FzName, libc.BoolInt32(libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx1)).FonError) != OE_None), azOrigin[int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0))], libc.BoolInt32((*TIndex)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18323, libc.VaList(bp+176, i2, (*TIndex)(unsafe.Pointer(pIdx1)).FzName, libc.BoolInt32(libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx1)).FonError) != OE_None), azOrigin[int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0))], libc.BoolInt32((*TIndex)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto _23 _23: ; @@ -115322,7 +115640,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*32))).FpBt == uintptr(0) { goto _24 } - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18257, libc.VaList(bp+176, i3, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*32))).FzDbSName, _sqlite3BtreeGetFilename(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*32))).FpBt))) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18329, libc.VaList(bp+176, i3, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*32))).FzDbSName, _sqlite3BtreeGetFilename(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*32))).FpBt))) goto _24 _24: ; @@ -115339,7 +115657,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p pColl = (*THashElem)(unsafe.Pointer(p)).Fdata v26 = i4 i4++ - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18261, libc.VaList(bp+176, v26, (*TCollSeq)(unsafe.Pointer(pColl)).FzName)) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18333, libc.VaList(bp+176, v26, (*TCollSeq)(unsafe.Pointer(pColl)).FzName)) goto _25 _25: ; @@ -115389,7 +115707,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p break } pMod = (*THashElem)(unsafe.Pointer(j1)).Fdata - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7806, libc.VaList(bp+176, (*TModule)(unsafe.Pointer(pMod)).FzName)) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7831, libc.VaList(bp+176, (*TModule)(unsafe.Pointer(pMod)).FzName)) goto _30 _30: ; @@ -115401,7 +115719,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if !(i6 < libc.Int32FromUint64(libc.Uint64FromInt64(1584)/libc.Uint64FromInt64(24))) { break } - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7806, libc.VaList(bp+176, _aPragmaName[i6].FzName)) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7831, libc.VaList(bp+176, _aPragmaName[i6].FzName)) goto _31 _31: ; @@ -115427,7 +115745,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if !(j2 < (*TFKey)(unsafe.Pointer(pFK)).FnCol) { break } - _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18264, libc.VaList(bp+176, i7, j2, (*TFKey)(unsafe.Pointer(pFK)).FzTo, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab5)).FaCol + uintptr((*(*TsColMap)(unsafe.Pointer(pFK + 64 + uintptr(j2)*16))).FiFrom)*16))).FzCnName, (*(*TsColMap)(unsafe.Pointer(pFK + 64 + uintptr(j2)*16))).FzCol, _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 45 + 1))), _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 45))), __ccgo_ts+18273)) + _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18336, libc.VaList(bp+176, i7, j2, (*TFKey)(unsafe.Pointer(pFK)).FzTo, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab5)).FaCol + uintptr((*(*TsColMap)(unsafe.Pointer(pFK + 64 + uintptr(j2)*16))).FiFrom)*16))).FzCnName, (*(*TsColMap)(unsafe.Pointer(pFK + 64 + uintptr(j2)*16))).FzCol, _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 45 + 1))), _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 45))), __ccgo_ts+18345)) goto _32 _32: ; @@ -115441,8 +115759,8 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } case int32(PragTyp_FOREIGN_KEY_CHECK): /* child to parent column mapping */ regResult = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(4) - v34 = pParse + 60 + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(4) + v34 = pParse + 64 *(*int32)(unsafe.Pointer(v34))++ v33 = *(*int32)(unsafe.Pointer(v34)) regRow = v33 @@ -115568,7 +115886,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } else { _sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, regResult+int32(1)) } - _sqlite3VdbeMultiLoad(tls, v, regResult+int32(2), __ccgo_ts+18278, libc.VaList(bp+176, (*TFKey)(unsafe.Pointer(pFK1)).FzTo, i8-int32(1))) + _sqlite3VdbeMultiLoad(tls, v, regResult+int32(2), __ccgo_ts+18350, libc.VaList(bp+176, (*TFKey)(unsafe.Pointer(pFK1)).FzTo, i8-int32(1))) _sqlite3VdbeAddOp2(tls, v, int32(OP_ResultRow), regResult, int32(4)) _sqlite3VdbeResolveLabel(tls, v, addrOk) _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 96))) @@ -115664,7 +115982,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p goto _40 } _sqlite3CodeVerifySchema(tls, pParse, i9) - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0) /* tag-20230327-1 */ + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(0), 2, 0x4) /* tag-20230327-1 */ /* Do an integrity check of the B-Tree ** ** Begin by finding the root pages numbers @@ -115759,7 +116077,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p _sqlite3VdbeAddOp4(tls, v, int32(OP_IntegrityCk), int32(1), cnt, int32(8), aRoot, -int32(14)) _sqlite3VdbeChangeP5(tls, v, libc.Uint16FromInt32(i9)) addr1 = _sqlite3VdbeAddOp1(tls, v, int32(OP_IsNull), int32(2)) - _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+18282, libc.VaList(bp+176, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i9)*32))).FzDbSName)), -int32(6)) + _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+18354, libc.VaList(bp+176, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i9)*32))).FzDbSName)), -int32(6)) _sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(2), int32(3), int32(3)) _integrityCheckResultRow(tls, v) _sqlite3VdbeJumpHere(tls, v, addr1) @@ -115770,7 +116088,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p v48 = 0 } cnt = v48 - _sqlite3VdbeLoadString(tls, v, int32(2), __ccgo_ts+18306) + _sqlite3VdbeLoadString(tls, v, int32(2), __ccgo_ts+18378) x2 = (*THash)(unsafe.Pointer(pTbls)).Ffirst for { if !(x2 != 0) { @@ -115906,7 +116224,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if pPk1 != 0 { a1 = _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxGT), *(*int32)(unsafe.Pointer(bp + 108)), 0, r2, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk1)).FnKeyCol)) _sqlite3VdbeAddOp1(tls, v, int32(OP_IsNull), r2) - zErr = _sqlite3MPrintf(tls, db, __ccgo_ts+18335, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName)) + zErr = _sqlite3MPrintf(tls, db, __ccgo_ts+18407, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName)) _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr, -int32(6)) _integrityCheckResultRow(tls, v) _sqlite3VdbeJumpHere(tls, v, a1) @@ -115968,7 +116286,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } p11 = *(*int32)(unsafe.Pointer(bp + 108)) if !((*TTable)(unsafe.Pointer(pTab10)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) { - p3 = int32(_sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab10), int16(j4))) + p3 = _sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab10), j4) } else { p3 = int32(_sqlite3TableColumnToStorage(tls, pTab10, int16(j4))) } @@ -115990,7 +116308,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p _sqlite3ColumnDefault(tls, v, pTab10, j4, int32(3)) jmp3 = _sqlite3VdbeAddOp2(tls, v, int32(OP_NotNull), int32(3), labelOk) } - zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18371, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName)) + zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18443, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName)) _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6)) if doTypeCheck != 0 { _sqlite3VdbeGoto(tls, v, labelError) @@ -116003,7 +116321,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if bStrict != 0 && doTypeCheck != 0 { _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IsType), p11, labelOk, p3, p4) _sqlite3VdbeChangeP5(tls, v, uint16(_aStdTypeMask[int32(uint32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4))-int32(1)])) - zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18391, libc.VaList(bp+176, _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*16))).FzCnName)) + zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18463, libc.VaList(bp+176, _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*16))).FzCnName)) _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6)) } else { if !(bStrict != 0) && int32((*TColumn)(unsafe.Pointer(pCol1)).Faffinity) == int32(SQLITE_AFF_TEXT) { @@ -116011,7 +116329,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p ** NULL, TEXT, or BLOB. */ _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IsType), p11, labelOk, p3, p4) _sqlite3VdbeChangeP5(tls, v, uint16(0x1c)) /* NULL, TEXT, or BLOB */ - zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18413, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*16))).FzCnName)) + zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18485, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*16))).FzCnName)) _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6)) } else { if !(bStrict != 0) && int32((*TColumn)(unsafe.Pointer(pCol1)).Faffinity) >= int32(SQLITE_AFF_NUMERIC) { @@ -116022,10 +116340,10 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if p11 >= 0 { _sqlite3ExprCodeGetColumnOfTable(tls, v, pTab10, *(*int32)(unsafe.Pointer(bp + 108)), j4, int32(3)) } - _sqlite3VdbeAddOp4(tls, v, int32(OP_Affinity), int32(3), int32(1), 0, __ccgo_ts+18436, -int32(1)) + _sqlite3VdbeAddOp4(tls, v, int32(OP_Affinity), int32(3), int32(1), 0, __ccgo_ts+18508, -int32(1)) _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IsType), -int32(1), labelOk, int32(3), p4) _sqlite3VdbeChangeP5(tls, v, uint16(0x1c)) /* NULL, TEXT, or BLOB */ - zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18438, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*16))).FzCnName)) + zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18510, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*16))).FzCnName)) _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6)) } } @@ -116059,7 +116377,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p _sqlite3ExprIfTrue(tls, pParse, (*(*TExprList_item)(unsafe.Pointer(pCheck + 8))).FpExpr, addrCkOk, int32(SQLITE_JUMPIFNULL)) _sqlite3VdbeResolveLabel(tls, v, addrCkFault) (*TParse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr2 = _sqlite3MPrintf(tls, db, __ccgo_ts+18458, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName)) + zErr2 = _sqlite3MPrintf(tls, db, __ccgo_ts+18530, libc.VaList(bp+176, (*TTable)(unsafe.Pointer(pTab10)).FzName)) _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr2, -int32(6)) _integrityCheckResultRow(tls, v) _sqlite3VdbeResolveLabel(tls, v, addrCkOk) @@ -116083,9 +116401,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p _sqlite3VdbeAddOp2(tls, v, int32(OP_AddImm), int32(8)+j4, int32(1)) /* increment entry count */ /* Verify that an index entry exists for the current table row */ jmp21 = _sqlite3VdbeAddOp4Int(tls, v, int32(OP_Found), *(*int32)(unsafe.Pointer(bp + 112))+j4, ckUniq, r1, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx6)).FnColumn)) - _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18488) + _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18560) _sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(7), int32(3), int32(3)) - _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18493) + _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18565) _sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(4), int32(3), int32(3)) jmp5 = _sqlite3VdbeLoadString(tls, v, int32(4), (*TIndex)(unsafe.Pointer(pIdx6)).FzName) _sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(4), int32(3), int32(3)) @@ -116098,9 +116416,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if (*TTable)(unsafe.Pointer(pTab10)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) { _sqlite3VdbeAddOp2(tls, v, int32(OP_IdxRowid), *(*int32)(unsafe.Pointer(bp + 112))+j4, int32(3)) jmp7 = _sqlite3VdbeAddOp3(tls, v, int32(OP_Eq), int32(3), 0, r1+libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx6)).FnColumn)-int32(1)) - _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18514) + _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18586) _sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(7), int32(3), int32(3)) - _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18550) + _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18622) _sqlite3VdbeGoto(tls, v, jmp5-int32(1)) _sqlite3VdbeJumpHere(tls, v, jmp7) } @@ -116128,9 +116446,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if label6 != 0 { jmp6 = _sqlite3VdbeAddOp0(tls, v, int32(OP_Goto)) _sqlite3VdbeResolveLabel(tls, v, label6) - _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18488) + _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18560) _sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(7), int32(3), int32(3)) - _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18561) + _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18633) _sqlite3VdbeGoto(tls, v, jmp5-int32(1)) _sqlite3VdbeJumpHere(tls, v, jmp6) } @@ -116158,7 +116476,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p _sqlite3VdbeGoto(tls, v, uniqOk) _sqlite3VdbeJumpHere(tls, v, jmp61) _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxGT), *(*int32)(unsafe.Pointer(bp + 112))+j4, uniqOk, r1, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx6)).FnKeyCol)) - _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18588) + _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18660) _sqlite3VdbeGoto(tls, v, jmp5) _sqlite3VdbeResolveLabel(tls, v, uniqOk) } @@ -116255,7 +116573,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p if aOp2 != 0 { (*(*TVdbeOp)(unsafe.Pointer(aOp2))).Fp2 = int32(1) - *(*int32)(unsafe.Pointer(bp + 104)) (*(*TVdbeOp)(unsafe.Pointer(aOp2 + 2*24))).Fp4type = int8(-libc.Int32FromInt32(1)) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = __ccgo_ts + 18615 + *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = __ccgo_ts + 18687 (*(*TVdbeOp)(unsafe.Pointer(aOp2 + 5*24))).Fp4type = int8(-libc.Int32FromInt32(1)) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = _sqlite3ErrStr(tls, int32(SQLITE_CORRUPT)) } @@ -116334,7 +116652,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p FzName uintptr Fenc Tu8 })(unsafe.Pointer(pEnc)).FzName != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18676, libc.VaList(bp+176, zRight)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18748, libc.VaList(bp+176, zRight)) } } } @@ -116439,13 +116757,13 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p iBt = v67 eMode2 = SQLITE_CHECKPOINT_PASSIVE if zRight != 0 { - if _sqlite3StrICmp(tls, zRight, __ccgo_ts+17901) == 0 { + if _sqlite3StrICmp(tls, zRight, __ccgo_ts+17973) == 0 { eMode2 = int32(SQLITE_CHECKPOINT_FULL) } else { - if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18701) == 0 { + if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18773) == 0 { eMode2 = int32(SQLITE_CHECKPOINT_RESTART) } else { - if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18054) == 0 { + if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18126) == 0 { eMode2 = int32(SQLITE_CHECKPOINT_TRUNCATE) } } @@ -116580,7 +116898,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p nLimit = int32(SQLITE_DEFAULT_OPTIMIZE_LIMIT) } } - v70 = pParse + 56 + v70 = pParse + 60 v69 = *(*int32)(unsafe.Pointer(v70)) *(*int32)(unsafe.Pointer(v70))++ iTabCur = v69 @@ -116610,7 +116928,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p goto _73 } /* Do not scan system tables */ - if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab12)).FzName, __ccgo_ts+6653, int32(7)) { + if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab12)).FzName, __ccgo_ts+6678, int32(7)) { goto _73 } /* Find the size of the table as last recorded in sqlite_stat1. @@ -116672,7 +116990,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p } else { _sqlite3VdbeAddOp2(tls, v, int32(OP_Rewind), iTabCur, libc.Int32FromUint32(libc.Uint32FromInt32(_sqlite3VdbeCurrentAddr(tls, v)+int32(2))+opMask&uint32(1))) } - zSubSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18709, libc.VaList(bp+176, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTable)(unsafe.Pointer(pTab12)).FzName)) + zSubSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18781, libc.VaList(bp+176, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTable)(unsafe.Pointer(pTab12)).FzName)) if opMask&uint32(0x01) != 0 { r11 = _sqlite3GetTempReg(tls, pParse) _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, r11, 0, zSubSql, -int32(6)) @@ -116945,34 +117263,34 @@ var _encnames1 = [9]struct { Fenc Tu8 }{ 0: { - FzName: __ccgo_ts + 18618, + FzName: __ccgo_ts + 18690, Fenc: uint8(SQLITE_UTF8), }, 1: { - FzName: __ccgo_ts + 18623, + FzName: __ccgo_ts + 18695, Fenc: uint8(SQLITE_UTF8), }, 2: { - FzName: __ccgo_ts + 18629, + FzName: __ccgo_ts + 18701, Fenc: uint8(SQLITE_UTF16LE), }, 3: { - FzName: __ccgo_ts + 18638, + FzName: __ccgo_ts + 18710, Fenc: uint8(SQLITE_UTF16BE), }, 4: { - FzName: __ccgo_ts + 18647, + FzName: __ccgo_ts + 18719, Fenc: uint8(SQLITE_UTF16LE), }, 5: { - FzName: __ccgo_ts + 18655, + FzName: __ccgo_ts + 18727, Fenc: uint8(SQLITE_UTF16BE), }, 6: { - FzName: __ccgo_ts + 18663, + FzName: __ccgo_ts + 18735, }, 7: { - FzName: __ccgo_ts + 18670, + FzName: __ccgo_ts + 18742, }, 8: {}, } @@ -117068,14 +117386,14 @@ func _pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg _ = argc _ = argv _sqlite3StrAccumInit(tls, bp, uintptr(0), bp+32, int32(200), 0) - Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18727) + Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18799) i = 0 j = libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FiPragCName) for { if !(i < libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FnPragCName)) { break } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18742, libc.VaList(bp+240, int32(cSep), _pragCName[j])) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18814, libc.VaList(bp+240, int32(cSep), _pragCName[j])) cSep = int8(',') goto _1 _1: @@ -117084,19 +117402,19 @@ func _pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg j++ } if i == 0 { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18749, libc.VaList(bp+240, (*TPragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18821, libc.VaList(bp+240, (*TPragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&int32(PragFlg_Result1) != 0 { - Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18755) + Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18827) j++ } if libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(libc.Int32FromInt32(PragFlg_SchemaOpt)|libc.Int32FromInt32(PragFlg_SchemaReq)) != 0 { - Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18767) + Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18839) j++ } - Xsqlite3_str_append(tls, bp, __ccgo_ts+5173, int32(1)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+5199, int32(1)) _sqlite3StrAccumFinish(tls, bp) rc = Xsqlite3_declare_vtab(tls, db, bp+32) if rc == SQLITE_OK { @@ -117111,7 +117429,7 @@ func _pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg (*TPragmaVtab)(unsafe.Pointer(pTab)).FnHidden = libc.Uint8FromInt32(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+240, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+240, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab return rc @@ -117292,7 +117610,7 @@ func _pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr } zText = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if zText != 0 { - *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+40, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+40, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return int32(SQLITE_NOMEM) } @@ -117304,13 +117622,13 @@ func _pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr j++ } _sqlite3StrAccumInit(tls, bp, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) - Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18782) + Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18854) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18790, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18862, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp, (*TPragmaName)(unsafe.Pointer((*TPragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18794, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18866, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = _sqlite3StrAccumFinish(tls, bp) if zSql == uintptr(0) { @@ -117319,7 +117637,7 @@ func _pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr rc = Xsqlite3_prepare_v2(tls, (*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -int32(1), pCsr+8, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*TPragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+40, Xsqlite3_errmsg(tls, (*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*TPragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+40, Xsqlite3_errmsg(tls, (*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return _pragmaVtabNext(tls, pVtabCursor) @@ -117445,24 +117763,24 @@ func _corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) /* A error message has already been generated. Do not overwrite it */ } else { if (*TInitData)(unsafe.Pointer(pData)).FmInitFlags&libc.Uint32FromInt32(libc.Int32FromInt32(INITFLAG_AlterMask)) != 0 { - *(*uintptr)(unsafe.Pointer((*TInitData)(unsafe.Pointer(pData)).FpzErrMsg)) = _sqlite3MPrintf(tls, db, __ccgo_ts+18828, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), _azAlterType[(*TInitData)(unsafe.Pointer(pData)).FmInitFlags&uint32(INITFLAG_AlterMask)-uint32(1)], zExtra)) + *(*uintptr)(unsafe.Pointer((*TInitData)(unsafe.Pointer(pData)).FpzErrMsg)) = _sqlite3MPrintf(tls, db, __ccgo_ts+18900, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), _azAlterType[(*TInitData)(unsafe.Pointer(pData)).FmInitFlags&uint32(INITFLAG_AlterMask)-uint32(1)], zExtra)) (*TInitData)(unsafe.Pointer(pData)).Frc = int32(SQLITE_ERROR) } else { if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(142805)) + (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(143745)) } else { if *(*uintptr)(unsafe.Pointer(azObj + 1*8)) != 0 { v1 = *(*uintptr)(unsafe.Pointer(azObj + 1*8)) } else { - v1 = __ccgo_ts + 5175 + v1 = __ccgo_ts + 5201 } zObj = v1 - z = _sqlite3MPrintf(tls, db, __ccgo_ts+18856, libc.VaList(bp+8, zObj)) + z = _sqlite3MPrintf(tls, db, __ccgo_ts+18928, libc.VaList(bp+8, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = _sqlite3MPrintf(tls, db, __ccgo_ts+18887, libc.VaList(bp+8, z, zExtra)) + z = _sqlite3MPrintf(tls, db, __ccgo_ts+18959, libc.VaList(bp+8, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*TInitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(142812)) + (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(143752)) } } } @@ -117470,9 +117788,9 @@ func _corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } var _azAlterType = [3]uintptr{ - 0: __ccgo_ts + 18798, - 1: __ccgo_ts + 18805, - 2: __ccgo_ts + 18817, + 0: __ccgo_ts + 18870, + 1: __ccgo_ts + 18877, + 2: __ccgo_ts + 18889, } // C documentation @@ -117548,7 +117866,7 @@ func _sqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(iDb) if _sqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FnewTnum > (*TInitData)(unsafe.Pointer(pData)).FmxPage && (*TInitData)(unsafe.Pointer(pData)).FmxPage > uint32(0) { if _sqlite3Config.FbExtraSchemaChecks != 0 { - _corruptSchema(tls, pData, argv, __ccgo_ts+14673) + _corruptSchema(tls, pData, argv, __ccgo_ts+14698) } } libc.SetBitFieldPtr8Uint32(db+192+8, libc.Uint32FromInt32(0), 0, 0x1) @@ -117581,11 +117899,11 @@ func _sqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr } else { pIndex = _sqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName) if pIndex == uintptr(0) { - _corruptSchema(tls, pData, argv, __ccgo_ts+18895) + _corruptSchema(tls, pData, argv, __ccgo_ts+18967) } else { if _sqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*TIndex)(unsafe.Pointer(pIndex)).Ftnum < uint32(2) || (*TIndex)(unsafe.Pointer(pIndex)).Ftnum > (*TInitData)(unsafe.Pointer(pData)).FmxPage || _sqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if _sqlite3Config.FbExtraSchemaChecks != 0 { - _corruptSchema(tls, pData, argv, __ccgo_ts+14673) + _corruptSchema(tls, pData, argv, __ccgo_ts+14698) } } } @@ -117624,18 +117942,18 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl ** table name will be inserted automatically by the parser so we can just ** use the abbreviation "x" here. The parser will also automatically tag ** the schema table as read-only. */ - (*(*[6]uintptr)(unsafe.Pointer(bp)))[0] = __ccgo_ts + 9247 + (*(*[6]uintptr)(unsafe.Pointer(bp)))[0] = __ccgo_ts + 9272 if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) { - v2 = __ccgo_ts + 6661 + v2 = __ccgo_ts + 6686 } else { - v2 = __ccgo_ts + 6149 + v2 = __ccgo_ts + 6173 } v1 = v2 zSchemaTabName = v1 (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(1)] = v1 (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(2)] = (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(1)] - (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(3)] = __ccgo_ts + 8319 - (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(4)] = __ccgo_ts + 18908 + (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(3)] = __ccgo_ts + 8344 + (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(4)] = __ccgo_ts + 18980 (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(5)] = uintptr(0) (*(*TInitData)(unsafe.Pointer(bp + 72))).Fdb = db (*(*TInitData)(unsafe.Pointer(bp + 72))).FiDb = iDb @@ -117719,7 +118037,7 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl } else { /* If opening an attached database, the encoding much match ENC(db) */ if (*(*[5]int32)(unsafe.Pointer(bp + 48)))[libc.Int32FromInt32(BTREE_TEXT_ENCODING)-libc.Int32FromInt32(1)]&int32(3) != libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Fenc) { - _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+12284) + _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+12309) rc = int32(SQLITE_ERROR) goto initone_error_out } @@ -117745,7 +118063,7 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = uint8(1) } if libc.Int32FromUint8((*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > int32(SQLITE_MAX_FILE_FORMAT) { - _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+18980) + _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+19052) rc = int32(SQLITE_ERROR) goto initone_error_out } @@ -117760,7 +118078,7 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl /* Read the schema information out of the schema tables */ (*(*TInitData)(unsafe.Pointer(bp + 72))).FmxPage = _sqlite3BtreeLastPage(tls, (*TDb)(unsafe.Pointer(pDb)).FpBt) - zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+19004, libc.VaList(bp+120, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zSchemaTabName)) + zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+19076, libc.VaList(bp+120, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zSchemaTabName)) xAuth = (*Tsqlite3)(unsafe.Pointer(db)).FxAuth (*Tsqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = Xsqlite3_exec(tls, db, zSql, __ccgo_fp(_sqlite3InitCallback), bp+72, uintptr(0)) @@ -118089,7 +118407,7 @@ func _sqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // ** is generated by Lemon. // */ func _sqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { - libc.Xmemset(tls, pParse+uintptr(uint64(libc.UintptrFromInt32(0)+8)), 0, uint64(libc.UintptrFromInt32(0)+232)-uint64(libc.UintptrFromInt32(0)+8)) + libc.Xmemset(tls, pParse+uintptr(uint64(libc.UintptrFromInt32(0)+8)), 0, uint64(libc.UintptrFromInt32(0)+192)-uint64(libc.UintptrFromInt32(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(libc.UintptrFromInt32(0)+288)), 0, libc.Uint64FromInt64(424)-uint64(libc.UintptrFromInt32(0)+288)) (*TParse)(unsafe.Pointer(pParse)).FpOuterParse = (*Tsqlite3)(unsafe.Pointer(db)).FpParse (*Tsqlite3)(unsafe.Pointer(db)).FpParse = pParse @@ -118118,7 +118436,7 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep _, _, _, _, _, _, _, _ = i, mxLen, pBt, pT, rc, zDb, zSqlCopy, v1 rc = SQLITE_OK /* Parsing context */ /* sqlite3ParseObjectInit(&sParse, db); // inlined for performance */ - libc.Xmemset(tls, bp+uintptr(uint64(libc.UintptrFromInt32(0)+8)), 0, uint64(libc.UintptrFromInt32(0)+232)-uint64(libc.UintptrFromInt32(0)+8)) + libc.Xmemset(tls, bp+uintptr(uint64(libc.UintptrFromInt32(0)+8)), 0, uint64(libc.UintptrFromInt32(0)+192)-uint64(libc.UintptrFromInt32(0)+8)) libc.Xmemset(tls, bp+uintptr(uint64(libc.UintptrFromInt32(0)+288)), 0, libc.Uint64FromInt64(424)-uint64(libc.UintptrFromInt32(0)+288)) (*(*TParse)(unsafe.Pointer(bp))).FpOuterParse = (*Tsqlite3)(unsafe.Pointer(db)).FpParse (*Tsqlite3)(unsafe.Pointer(db)).FpParse = bp @@ -118178,7 +118496,7 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep rc = _sqlite3BtreeSchemaLocked(tls, pBt) if rc != 0 { zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32))).FzDbSName - _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+19038, libc.VaList(bp+432, zDb)) + _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+19110, libc.VaList(bp+432, zDb)) goto end_prepare } } @@ -118194,7 +118512,7 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep if nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-int32(1))))) != 0) { mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if nBytes > mxLen { - _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_TOOBIG), __ccgo_ts+19068, 0) + _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_TOOBIG), __ccgo_ts+19140, 0) rc = _sqlite3ApiExit(tls, db, int32(SQLITE_TOOBIG)) goto end_prepare } @@ -118217,10 +118535,10 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep } if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*(*TParse)(unsafe.Pointer(bp))).Frc = int32(SQLITE_NOMEM) - (*(*TParse)(unsafe.Pointer(bp))).FcheckSchema = uint8(0) + libc.SetBitFieldPtr8Uint32(bp+44, libc.Uint32FromInt32(0), 3, 0x8) } if (*(*TParse)(unsafe.Pointer(bp))).Frc != SQLITE_OK && (*(*TParse)(unsafe.Pointer(bp))).Frc != int32(SQLITE_DONE) { - if (*(*TParse)(unsafe.Pointer(bp))).FcheckSchema != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 { + if int32(Tbft(*(*uint8)(unsafe.Pointer(bp + 44))&0x8>>3)) != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 { _schemaIsValid(tls, bp) } if (*(*TParse)(unsafe.Pointer(bp))).FpVdbe != 0 { @@ -118228,7 +118546,7 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep } rc = (*(*TParse)(unsafe.Pointer(bp))).Frc if (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg != 0 { - _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+3862, libc.VaList(bp+432, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg)) + _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+3888, libc.VaList(bp+432, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg)) _sqlite3DbFree(tls, db, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg) } else { _sqlite3Error(tls, db, rc) @@ -118258,7 +118576,7 @@ func _sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int3 cnt = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(_sqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return _sqlite3MisuseError(tls, int32(143612)) + return _sqlite3MisuseError(tls, int32(144552)) } Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) _sqlite3BtreeEnterAll(tls, db) @@ -118392,7 +118710,7 @@ func _sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pr rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(_sqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return _sqlite3MisuseError(tls, int32(143761)) + return _sqlite3MisuseError(tls, int32(144701)) } /* Make sure nBytes is non-negative and correct. It should be the ** number of bytes until the end of the input buffer or until the first @@ -118652,7 +118970,7 @@ func _sqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp (*TSelect)(unsafe.Pointer(pNew)).FselFlags = selFlags (*TSelect)(unsafe.Pointer(pNew)).FiLimit = 0 (*TSelect)(unsafe.Pointer(pNew)).FiOffset = 0 - v3 = pParse + 148 + v3 = pParse + 132 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) (*TSelect)(unsafe.Pointer(pNew)).FselId = libc.Uint32FromInt32(v2) @@ -118660,7 +118978,7 @@ func _sqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp *(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -int32(1) (*TSelect)(unsafe.Pointer(pNew)).FnSelectRow = 0 if pSrc == uintptr(0) { - pSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(88)) + pSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt64(80))) } (*TSelect)(unsafe.Pointer(pNew)).FpSrc = pSrc (*TSelect)(unsafe.Pointer(pNew)).FpWhere = pWhere @@ -118816,15 +119134,15 @@ func _sqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC i++ } if jointype&(libc.Int32FromInt32(JT_INNER)|libc.Int32FromInt32(JT_OUTER)) == libc.Int32FromInt32(JT_INNER)|libc.Int32FromInt32(JT_OUTER) || jointype&int32(JT_ERROR) != 0 || jointype&(libc.Int32FromInt32(JT_OUTER)|libc.Int32FromInt32(JT_LEFT)|libc.Int32FromInt32(JT_RIGHT)) == int32(JT_OUTER) { - zSp1 = __ccgo_ts + 11391 - zSp2 = __ccgo_ts + 11391 + zSp1 = __ccgo_ts + 11416 + zSp2 = __ccgo_ts + 11416 if pB == uintptr(0) { zSp1++ } if pC == uintptr(0) { zSp2++ } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19087, libc.VaList(bp+8, pA, zSp1, pB, zSp2, pC)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19159, libc.VaList(bp+8, pA, zSp1, pB, zSp2, pC)) jointype = int32(JT_INNER) } return jointype @@ -118881,25 +119199,28 @@ var _aKeyword = [7]struct { // ** is not contained in the table. // */ func _sqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) (r int32) { + var aCol uintptr var h Tu8 - var i int32 - var pCol uintptr - _, _, _ = h, i, pCol + var i, nCol int32 + _, _, _, _ = aCol, h, i, nCol h = _sqlite3StrIHash(tls, zCol) - pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol - i = libc.Int32FromInt32(0) - for { - if !(i < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } - if libc.Int32FromUint8((*TColumn)(unsafe.Pointer(pCol)).FhName) == libc.Int32FromUint8(h) && _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 { + aCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + nCol = int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + /* See if the aHx gives us a lucky match */ + i = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTab + 104 + uintptr(uint64(h)%uint64(16))))) + if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*16))).FhName) == libc.Int32FromUint8(h) && _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*16))).FzCnName, zCol) == 0 { + return i + } + /* No lucky match from the hash table. Do a full search. */ + i = 0 + for int32(1) != 0 { + if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*16))).FhName) == libc.Int32FromUint8(h) && _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*16))).FzCnName, zCol) == 0 { return i } - goto _1 - _1: - ; - pCol += 16 i++ + if i >= nCol { + break + } } return -int32(1) } @@ -119031,13 +119352,13 @@ func _unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32, nullable int32) { _ = i for p != 0 { if iTable < 0 || (*TExpr)(unsafe.Pointer(p)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != uint32(0) && *(*int32)(unsafe.Pointer(p + 52)) == iTable { - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^(libc.Int32FromInt32(EP_OuterON) | libc.Int32FromInt32(EP_InnerON))) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON) | libc.Int32FromInt32(EP_InnerON)) if iTable >= 0 { *(*Tu32)(unsafe.Pointer(p + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_InnerON)) } } if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(p)).Fop) == int32(TK_COLUMN) && (*TExpr)(unsafe.Pointer(p)).FiTable == iTable && !(nullable != 0) { - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_CanBeNull)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_CanBeNull)) } if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(p)).Fop) == int32(TK_FUNCTION) { if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { @@ -119115,7 +119436,7 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&int32(JT_NATURAL) != 0 { pUsing = uintptr(0) if int32(*(*uint32)(unsafe.Pointer(pRight + 24 + 4))&0x800>>11) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 64)) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19117, libc.VaList(bp+16, 0)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19189, libc.VaList(bp+16, 0)) return int32(1) } j = 0 @@ -119165,12 +119486,12 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { zName1 = (*(*TIdList_item)(unsafe.Pointer(pList + 8 + uintptr(j)*8))).FzName iRightCol = _sqlite3ColumnIndex(tls, pRightTab, zName1) if iRightCol < 0 || _tableAndColumnIndex(tls, pSrc, 0, i, zName1, bp, bp+4, int32(*(*uint32)(unsafe.Pointer(pRight + 24 + 4))&0x2000>>13)) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19167, libc.VaList(bp+16, zName1)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19239, libc.VaList(bp+16, zName1)) return int32(1) } pE1 = _sqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) _sqlite3SrcItemColumnUsed(tls, pSrc+8+uintptr(*(*int32)(unsafe.Pointer(bp)))*80, *(*int32)(unsafe.Pointer(bp + 4))) - if libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).Ffg.Fjointype)&int32(JT_LTORJ) != 0 { + if libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).Ffg.Fjointype)&int32(JT_LTORJ) != 0 && (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 { /* This branch runs if the query contains one or more RIGHT or FULL ** JOINs. If only a single table on the left side of this join ** contains the zName column, then this branch is a no-op. @@ -119185,9 +119506,10 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { ** adding a new error so as to not break legacy applications. */ pFuncArgs = uintptr(0) /* Arguments to the coalesce() */ + *(*Tu32)(unsafe.Pointer(pE1 + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_CanBeNull)) for _tableAndColumnIndex(tls, pSrc, *(*int32)(unsafe.Pointer(bp))+int32(1), i, zName1, bp, bp+4, int32(*(*uint32)(unsafe.Pointer(pRight + 24 + 4))&0x2000>>13)) != 0 { if int32(*(*uint32)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp)))*80 + 24 + 4))&0x800>>11) == 0 || _sqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp)))*80 + 64)), zName1) < 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19231, libc.VaList(bp+16, zName1)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19303, libc.VaList(bp+16, zName1)) break } pFuncArgs = _sqlite3ExprListAppend(tls, pParse, pFuncArgs, pE1) @@ -119197,6 +119519,13 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { if pFuncArgs != 0 { pFuncArgs = _sqlite3ExprListAppend(tls, pParse, pFuncArgs, pE1) pE1 = _sqlite3ExprFunction(tls, pParse, pFuncArgs, uintptr(unsafe.Pointer(&_tkCoalesce)), 0) + if pE1 != 0 { + (*TExpr)(unsafe.Pointer(pE1)).FaffExpr = int8(SQLITE_AFF_DEFER) + } + } + } else { + if libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i+int32(1))*80))).Ffg.Fjointype)&int32(JT_LEFT) != 0 && (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 { + *(*Tu32)(unsafe.Pointer(pE1 + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_CanBeNull)) } } pE2 = _sqlite3CreateColumnExpr(tls, db, pSrc, i+int32(1), iRightCol) @@ -119231,7 +119560,7 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { } var _tkCoalesce = TToken{ - Fz: __ccgo_ts + 6858, + Fz: __ccgo_ts + 6883, Fn: uint32(8), } @@ -119279,7 +119608,7 @@ func _makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uin _, _, _, _, _ = nOBSat, regOut, v, v1, v2 nOBSat = (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) regOut = v1 @@ -119324,7 +119653,7 @@ func _pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintp regBase = regData - nPrefixReg } else { regBase = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nBase + *(*int32)(unsafe.Pointer(pParse + 64)) += nBase } if (*TSelect)(unsafe.Pointer(pSelect)).FiOffset != 0 { v1 = (*TSelect)(unsafe.Pointer(pSelect)).FiOffset + int32(1) @@ -119348,7 +119677,7 @@ func _pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintp if nOBSat > 0 { /* Original KeyInfo on the sorter table */ regRecord = _makeSorterRecord(tls, pParse, pSort, pSelect, regBase, nBase) regPrevKey = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat + *(*int32)(unsafe.Pointer(pParse + 64)) += (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat nKey = nExpr - (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat + bSeq if bSeq != 0 { addrFirst = _sqlite3VdbeAddOp1(tls, v, int32(OP_IfNot), regBase+nExpr) @@ -119369,7 +119698,7 @@ func _pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintp addrJmp = _sqlite3VdbeCurrentAddr(tls, v) _sqlite3VdbeAddOp3(tls, v, int32(OP_Jump), addrJmp+int32(1), 0, addrJmp+int32(1)) (*TSortCtx)(unsafe.Pointer(pSort)).FlabelBkOut = _sqlite3VdbeMakeLabel(tls, pParse) - v4 = pParse + 60 + v4 = pParse + 64 *(*int32)(unsafe.Pointer(v4))++ v3 = *(*int32)(unsafe.Pointer(v4)) (*TSortCtx)(unsafe.Pointer(pSort)).FregReturn = v3 @@ -119492,7 +119821,7 @@ func _codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, a v1 = (*TParse)(unsafe.Pointer(pParse)).FnMem + libc.Int32FromInt32(1) regPrev = v1 iRet = v1 - *(*int32)(unsafe.Pointer(pParse + 60)) += nResultCol + *(*int32)(unsafe.Pointer(pParse + 64)) += nResultCol iJump = _sqlite3VdbeCurrentAddr(tls, v) + nResultCol i = 0 for { @@ -119619,10 +119948,10 @@ func _selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pS if !(libc.Int32FromUint8((*TSortCtx)(unsafe.Pointer(pSort)).FsortFlags)&libc.Int32FromInt32(SORTFLAG_UseSorter) != 0) { nPrefixReg++ } - *(*int32)(unsafe.Pointer(pParse + 60)) += nPrefixReg + *(*int32)(unsafe.Pointer(pParse + 64)) += nPrefixReg } (*TSelectDest)(unsafe.Pointer(pDest)).FiSdst = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nResultCol + *(*int32)(unsafe.Pointer(pParse + 64)) += nResultCol } else { if (*TSelectDest)(unsafe.Pointer(pDest)).FiSdst+nResultCol > (*TParse)(unsafe.Pointer(pParse)).FnMem { /* This is an error condition that can result, for example, when a SELECT @@ -119630,7 +119959,7 @@ func _selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pS ** there are columns in the table on the left. The error will be caught ** and reported later. But we need to make sure enough memory is allocated ** to avoid other spurious errors in the meantime. */ - *(*int32)(unsafe.Pointer(pParse + 60)) += nResultCol + *(*int32)(unsafe.Pointer(pParse + 64)) += nResultCol } } (*TSelectDest)(unsafe.Pointer(pDest)).FnSdst = nResultCol @@ -119807,7 +120136,7 @@ func _selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pS _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxInsert), iParm, r13, regResult, nResultCol) if (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2 != 0 { _sqlite3VdbeAddOp4Int(tls, v, int32(OP_FilterAdd), (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2, 0, regResult, nResultCol) - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19268, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19340, 0) } _sqlite3ReleaseTempReg(tls, pParse, r13) } @@ -119918,8 +120247,8 @@ func _sqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) (r uintpt var nExtra int32 var p uintptr _, _ = nExtra, p - nExtra = libc.Int32FromUint64(libc.Uint64FromInt32(N+X)*(libc.Uint64FromInt64(8)+libc.Uint64FromInt32(1)) - uint64(8)) - p = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(40)+libc.Uint64FromInt32(nExtra))) + nExtra = libc.Int32FromUint64(libc.Uint64FromInt32(N+X) * (libc.Uint64FromInt64(8) + libc.Uint64FromInt32(1))) + p = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(libc.Int32FromInt32(0))*libc.Uint64FromInt64(8)+libc.Uint64FromInt32(nExtra))) if p != 0 { (*TKeyInfo)(unsafe.Pointer(p)).FaSortFlags = p + 32 + uintptr(N+X)*8 (*TKeyInfo)(unsafe.Pointer(p)).FnKeyField = libc.Uint16FromInt32(N) @@ -119927,7 +120256,7 @@ func _sqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) (r uintpt (*TKeyInfo)(unsafe.Pointer(p)).Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc (*TKeyInfo)(unsafe.Pointer(p)).Fdb = db (*TKeyInfo)(unsafe.Pointer(p)).FnRef = uint32(1) - libc.Xmemset(tls, p+1*40, 0, libc.Uint64FromInt32(nExtra)) + libc.Xmemset(tls, p+32, 0, libc.Uint64FromInt32(nExtra)) } else { return _sqlite3OomFault(tls, db) } @@ -120012,13 +120341,13 @@ func _sqlite3SelectOpName(tls *libc.TLS, id int32) (r uintptr) { _ = z switch id { case int32(TK_ALL): - z = __ccgo_ts + 19288 + z = __ccgo_ts + 19360 case int32(TK_INTERSECT): - z = __ccgo_ts + 19298 + z = __ccgo_ts + 19370 case int32(TK_EXCEPT): - z = __ccgo_ts + 19308 + z = __ccgo_ts + 19380 default: - z = __ccgo_ts + 19315 + z = __ccgo_ts + 19387 break } return z @@ -120039,7 +120368,7 @@ func _sqlite3SelectOpName(tls *libc.TLS, id int32) (r uintptr) { func _explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19321, libc.VaList(bp+8, zUsage)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19393, libc.VaList(bp+8, zUsage)) } /* @@ -120076,13 +120405,13 @@ func _generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nKey = (*TExprList)(unsafe.Pointer(pOrderBy)).FnExpr - (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat if (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat == 0 || nKey == int32(1) { if (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat != 0 { - v1 = __ccgo_ts + 19344 + v1 = __ccgo_ts + 19416 } else { v1 = __ccgo_ts + 1665 } - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19358, libc.VaList(bp+8, v1)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19430, libc.VaList(bp+8, v1)) } else { - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19389, libc.VaList(bp+8, nKey)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19461, libc.VaList(bp+8, nKey)) } if (*TSortCtx)(unsafe.Pointer(pSort)).FlabelBkOut != 0 { _sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), (*TSortCtx)(unsafe.Pointer(pSort)).FregReturn, (*TSortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) @@ -120106,11 +120435,11 @@ func _generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, } } if libc.Int32FromUint8((*TSortCtx)(unsafe.Pointer(pSort)).FsortFlags)&int32(SORTFLAG_UseSorter) != 0 { - v3 = pParse + 60 + v3 = pParse + 64 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) regSortOut = v2 - v5 = pParse + 56 + v5 = pParse + 60 v4 = *(*int32)(unsafe.Pointer(v5)) *(*int32)(unsafe.Pointer(v5))++ iSortTab = v4 @@ -120326,7 +120655,7 @@ func _columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr } if iCol < 0 { zType = __ccgo_ts + 1139 - *(*uintptr)(unsafe.Pointer(bp + 16)) = __ccgo_ts + 16848 + *(*uintptr)(unsafe.Pointer(bp + 16)) = __ccgo_ts + 16920 } else { *(*uintptr)(unsafe.Pointer(bp + 16)) = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName zType = _sqlite3ColumnType(tls, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, uintptr(0)) @@ -120439,7 +120768,7 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = db, fullName, i, iCol, p, pEList, pTab, pTabList, srcName, v, z, zCol, zName, zName1, v2 v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* COLUMN or TABLE.COLUMN if no AS clause and is direct */ - if (*TParse)(unsafe.Pointer(pParse)).FcolNamesSet != 0 { + if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 44))&0x1>>0)) != 0 { return } /* Column names are determined by the left-most term of a compound select */ @@ -120448,7 +120777,7 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } pTabList = (*TSelect)(unsafe.Pointer(pSelect)).FpSrc pEList = (*TSelect)(unsafe.Pointer(pSelect)).FpEList - (*TParse)(unsafe.Pointer(pParse)).FcolNamesSet = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 0, 0x1) fullName = libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_FullColNames) != uint64(0)) srcName = libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ShortColNames) != uint64(0) || fullName != 0) _sqlite3VdbeSetNumCols(tls, v, (*TExprList)(unsafe.Pointer(pEList)).FnExpr) @@ -120472,13 +120801,13 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) iCol = int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) } if iCol < 0 { - zCol = __ccgo_ts + 16848 + zCol = __ccgo_ts + 16920 } else { zCol = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName } if fullName != 0 { zName1 = uintptr(0) - zName1 = _sqlite3MPrintf(tls, db, __ccgo_ts+12570, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zCol)) + zName1 = _sqlite3MPrintf(tls, db, __ccgo_ts+12595, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zCol)) _sqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName1, __ccgo_fp(_sqlite3OomClear)) } else { _sqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, uintptr(-libc.Int32FromInt32(1))) @@ -120486,7 +120815,7 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { z = (*(*TExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32))).FzEName if z == uintptr(0) { - v2 = _sqlite3MPrintf(tls, db, __ccgo_ts+19435, libc.VaList(bp+8, i+int32(1))) + v2 = _sqlite3MPrintf(tls, db, __ccgo_ts+19507, libc.VaList(bp+8, i+int32(1))) } else { v2 = _sqlite3DbStrDup(tls, db, z) } @@ -120578,7 +120907,7 @@ func _sqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, if iCol >= 0 { v3 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16))).FzCnName } else { - v3 = __ccgo_ts + 16848 + v3 = __ccgo_ts + 16920 } zName = v3 } else { @@ -120593,7 +120922,7 @@ func _sqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, if zName != 0 && !(_sqlite3IsTrueOrFalse(tls, zName) != 0) { zName = _sqlite3DbStrDup(tls, db, zName) } else { - zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19435, libc.VaList(bp+40, i+int32(1))) + zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19507, libc.VaList(bp+40, i+int32(1))) } /* Make sure the column name is unique. If the name is not unique, ** append an integer to the name so that it becomes unique. @@ -120629,7 +120958,7 @@ func _sqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, } *(*Tu32)(unsafe.Pointer(bp))++ v8 = *(*Tu32)(unsafe.Pointer(bp)) - zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19444, libc.VaList(bp+40, nName, zName, v8)) + zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19516, libc.VaList(bp+40, nName, zName, v8)) _sqlite3ProgressCheck(tls, pParse) if *(*Tu32)(unsafe.Pointer(bp)) > uint32(3) { Xsqlite3_randomness(tls, int32(4), bp) @@ -120748,7 +121077,7 @@ func _sqlite3SubqueryColumnTypes(tls *libc.TLS, pParse uintptr, pTab uintptr, pS zType = _columnTypeImpl(tls, bp, p, uintptr(0), uintptr(0), uintptr(0)) if zType == uintptr(0) || int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity) != int32(_sqlite3AffinityType(tls, zType, uintptr(0))) { if int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity) == int32(SQLITE_AFF_NUMERIC) || int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity) == int32(SQLITE_AFF_FLEXNUM) { - zType = __ccgo_ts + 19452 + zType = __ccgo_ts + 19524 } else { zType = uintptr(0) j = int32(1) @@ -120814,7 +121143,7 @@ func _sqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a for (*TSelect)(unsafe.Pointer(pSelect)).FpPrior != 0 { pSelect = (*TSelect)(unsafe.Pointer(pSelect)).FpPrior } - pTab = _sqlite3DbMallocZero(tls, db, uint64(104)) + pTab = _sqlite3DbMallocZero(tls, db, uint64(120)) if pTab == uintptr(0) { return uintptr(0) } @@ -120842,7 +121171,7 @@ func _sqlite3GetVdbe(tls *libc.TLS, pParse uintptr) (r uintptr) { return (*TParse)(unsafe.Pointer(pParse)).FpVdbe } if (*TParse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0) && (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FactorOutConst)) == uint32(0) { - (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 2, 0x4) } return _sqlite3VdbeCreate(tls, pParse) } @@ -120892,7 +121221,7 @@ func _computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int ** no rows. */ if pLimit != 0 { - v3 = pParse + 60 + v3 = pParse + 64 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) v1 = v2 @@ -120915,7 +121244,7 @@ func _computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int _sqlite3VdbeAddOp2(tls, v, int32(OP_IfNot), iLimit, iBreak) } if (*TExpr)(unsafe.Pointer(pLimit)).FpRight != 0 { - v6 = pParse + 60 + v6 = pParse + 64 *(*int32)(unsafe.Pointer(v6))++ v5 = *(*int32)(unsafe.Pointer(v6)) v4 = v5 @@ -121063,7 +121392,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest iDistinct = 0 /* To ensure unique results if UNION */ eDest = int32(SRT_Fifo) /* Registers used by LIMIT and OFFSET */ if (*TSelect)(unsafe.Pointer(p)).FpWin != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19456, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19528, 0) return } /* Obtain authorization to do a recursive query */ @@ -121100,7 +121429,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest /* Allocate cursors numbers for Queue and Distinct. The cursor number for ** the Distinct table must be exactly one greater than Queue in order ** for the SRT_DistFifo and SRT_DistQueue destinations to work. */ - v4 = pParse + 56 + v4 = pParse + 60 v3 = *(*int32)(unsafe.Pointer(v4)) *(*int32)(unsafe.Pointer(v4))++ iQueue = v3 @@ -121111,7 +121440,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest v5 = int32(SRT_DistFifo) } eDest = v5 - v7 = pParse + 56 + v7 = pParse + 60 v6 = *(*int32)(unsafe.Pointer(v7)) *(*int32)(unsafe.Pointer(v7))++ iDistinct = v6 @@ -121125,7 +121454,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest } _sqlite3SelectDestInit(tls, bp, eDest, iQueue) /* Allocate cursors for Current, Queue, and Distinct. */ - v10 = pParse + 60 + v10 = pParse + 64 *(*int32)(unsafe.Pointer(v10))++ v9 = *(*int32)(unsafe.Pointer(v10)) regCurrent = v9 @@ -121156,7 +121485,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest break } if (*TSelect)(unsafe.Pointer(pFirstRec)).FselFlags&uint32(SF_Aggregate) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19505, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19577, 0) goto end_of_recursive_query } (*TSelect)(unsafe.Pointer(pFirstRec)).Fop = uint8(TK_ALL) @@ -121171,7 +121500,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest /* Store the results of the setup-query in Queue. */ pSetup = (*TSelect)(unsafe.Pointer(pFirstRec)).FpPrior (*TSelect)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19547, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19619, 0) rc = _sqlite3Select(tls, pParse, pSetup, bp) (*TSelect)(unsafe.Pointer(pSetup)).FpNext = p if rc != 0 { @@ -121199,7 +121528,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest ** the value for the recursive-table. Store the results in the Queue. */ (*TSelect)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19553, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19625, 0) _sqlite3Select(tls, pParse, p, bp) (*TSelect)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup /* Keep running the loop until the Queue is empty */ @@ -121254,9 +121583,9 @@ func _multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) if nRow == int32(1) { v1 = __ccgo_ts + 1665 } else { - v1 = __ccgo_ts + 19568 + v1 = __ccgo_ts + 19640 } - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19570, libc.VaList(bp+8, nRow, v1)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19642, libc.VaList(bp+8, nRow, v1)) for p != 0 { _selectInnerLoop(tls, pParse, p, -int32(1), uintptr(0), uintptr(0), pDest, int32(1), int32(1)) if !(bShowAll != 0) { @@ -121364,8 +121693,8 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in return _multiSelectOrderBy(tls, pParse, p, pDest) } else { if (*TSelect)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0) { - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19593, 0) - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19608, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19665, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19680, 0) } /* Generate code for the left and right SELECT statements. */ @@ -121390,7 +121719,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in _sqlite3VdbeAddOp3(tls, v, int32(OP_OffsetLimit), (*TSelect)(unsafe.Pointer(p)).FiLimit, (*TSelect)(unsafe.Pointer(p)).FiOffset+int32(1), (*TSelect)(unsafe.Pointer(p)).FiOffset) } } - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19288, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19360, 0) rc = _sqlite3Select(tls, pParse, p, bp) pDelete = (*TSelect)(unsafe.Pointer(p)).FpPrior (*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior @@ -121416,7 +121745,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in /* We will need to create our own temporary table to hold the ** intermediate results. */ - v2 = pParse + 56 + v2 = pParse + 60 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ unionTab = v1 @@ -121442,7 +121771,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in pLimit = (*TSelect)(unsafe.Pointer(p)).FpLimit (*TSelect)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*(*TSelectDest)(unsafe.Pointer(bp + 48))).FeDest = op - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19627, libc.VaList(bp+136, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19699, libc.VaList(bp+136, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) rc = _sqlite3Select(tls, pParse, p, bp+48) pDelete = (*TSelect)(unsafe.Pointer(p)).FpPrior (*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior @@ -121474,11 +121803,11 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in ** two temporary tables. Hence it has its own case. Begin ** by allocating the tables we will need. */ - v4 = pParse + 56 + v4 = pParse + 60 v3 = *(*int32)(unsafe.Pointer(v4)) *(*int32)(unsafe.Pointer(v4))++ tab1 = v3 - v6 = pParse + 56 + v6 = pParse + 60 v5 = *(*int32)(unsafe.Pointer(v6)) *(*int32)(unsafe.Pointer(v6))++ tab2 = v5 @@ -121500,7 +121829,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in pLimit1 = (*TSelect)(unsafe.Pointer(p)).FpLimit (*TSelect)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*(*TSelectDest)(unsafe.Pointer(bp + 88))).FiSDParm = tab2 - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19627, libc.VaList(bp+136, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19699, libc.VaList(bp+136, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) rc = _sqlite3Select(tls, pParse, p, bp+88) pDelete = (*TSelect)(unsafe.Pointer(p)).FpPrior (*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior @@ -121624,9 +121953,9 @@ func _sqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) bp := tls.Alloc(16) defer tls.Free(16) if (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Values) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19648, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19720, 0) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19694, libc.VaList(bp+8, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19766, libc.VaList(bp+8, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) } } @@ -121697,7 +122026,7 @@ func _generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uin _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxInsert), (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm, r11, (*TSelectDest)(unsafe.Pointer(pIn)).FiSdst, (*TSelectDest)(unsafe.Pointer(pIn)).FnSdst) if (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2 > 0 { _sqlite3VdbeAddOp4Int(tls, v, int32(OP_FilterAdd), (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2, 0, (*TSelectDest)(unsafe.Pointer(pIn)).FiSdst, (*TSelectDest)(unsafe.Pointer(pIn)).FnSdst) - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19268, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19340, 0) } _sqlite3ReleaseTempReg(tls, pParse, r11) break @@ -121945,7 +122274,7 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr } else { nExpr = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList)).FnExpr regPrev = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nExpr + int32(1) + *(*int32)(unsafe.Pointer(pParse + 64)) += nExpr + int32(1) _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regPrev) pKeyDup = _sqlite3KeyInfoAlloc(tls, db, nExpr, int32(1)) if pKeyDup != 0 { @@ -121999,16 +122328,16 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr (*TSelect)(unsafe.Pointer(pSplit)).FpPrior = uintptr(0) (*TSelect)(unsafe.Pointer(pPrior)).FpNext = uintptr(0) (*TSelect)(unsafe.Pointer(pPrior)).FpOrderBy = _sqlite3ExprListDup(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pOrderBy, 0) - _sqlite3ResolveOrderGroupBy(tls, pParse, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7556) - _sqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*TSelect)(unsafe.Pointer(pPrior)).FpOrderBy, __ccgo_ts+7556) + _sqlite3ResolveOrderGroupBy(tls, pParse, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7581) + _sqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*TSelect)(unsafe.Pointer(pPrior)).FpOrderBy, __ccgo_ts+7581) /* Compute the limit registers */ _computeLimitRegisters(tls, pParse, p, labelEnd) if (*TSelect)(unsafe.Pointer(p)).FiLimit != 0 && op == int32(TK_ALL) { - v10 = pParse + 60 + v10 = pParse + 64 *(*int32)(unsafe.Pointer(v10))++ v9 = *(*int32)(unsafe.Pointer(v10)) regLimitA = v9 - v12 = pParse + 60 + v12 = pParse + 64 *(*int32)(unsafe.Pointer(v12))++ v11 = *(*int32)(unsafe.Pointer(v12)) regLimitB = v11 @@ -122026,32 +122355,32 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr } _sqlite3ExprDelete(tls, db, (*TSelect)(unsafe.Pointer(p)).FpLimit) (*TSelect)(unsafe.Pointer(p)).FpLimit = uintptr(0) - v16 = pParse + 60 + v16 = pParse + 64 *(*int32)(unsafe.Pointer(v16))++ v15 = *(*int32)(unsafe.Pointer(v16)) regAddrA = v15 - v18 = pParse + 60 + v18 = pParse + 64 *(*int32)(unsafe.Pointer(v18))++ v17 = *(*int32)(unsafe.Pointer(v18)) regAddrB = v17 - v20 = pParse + 60 + v20 = pParse + 64 *(*int32)(unsafe.Pointer(v20))++ v19 = *(*int32)(unsafe.Pointer(v20)) regOutA = v19 - v22 = pParse + 60 + v22 = pParse + 64 *(*int32)(unsafe.Pointer(v22))++ v21 = *(*int32)(unsafe.Pointer(v22)) regOutB = v21 _sqlite3SelectDestInit(tls, bp, int32(SRT_Coroutine), regAddrA) _sqlite3SelectDestInit(tls, bp+40, int32(SRT_Coroutine), regAddrB) - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19776, libc.VaList(bp+88, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19848, libc.VaList(bp+88, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop)))) /* Generate a coroutine to evaluate the SELECT statement to the ** left of the compound operator - the "A" select. */ addrSelectA = _sqlite3VdbeCurrentAddr(tls, v) + int32(1) addr1 = _sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), regAddrA, 0, addrSelectA) (*TSelect)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19787, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19859, 0) _sqlite3Select(tls, pParse, pPrior, bp) _sqlite3VdbeEndCoroutine(tls, v, regAddrA) _sqlite3VdbeJumpHere(tls, v, addr1) @@ -122064,7 +122393,7 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr savedOffset = (*TSelect)(unsafe.Pointer(p)).FiOffset (*TSelect)(unsafe.Pointer(p)).FiLimit = regLimitB (*TSelect)(unsafe.Pointer(p)).FiOffset = 0 - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19792, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19864, 0) _sqlite3Select(tls, pParse, p, bp+40) (*TSelect)(unsafe.Pointer(p)).FiLimit = savedLimit (*TSelect)(unsafe.Pointer(p)).FiOffset = savedOffset @@ -122274,11 +122603,11 @@ func _substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) (r uintptr) { if pColl != 0 { v1 = (*TCollSeq)(unsafe.Pointer(pColl)).FzName } else { - v1 = __ccgo_ts + 5153 + v1 = __ccgo_ts + 5179 } pNew = _sqlite3ExprAddCollateString(tls, (*TSubstContext)(unsafe.Pointer(pSubst)).FpParse, pNew, v1) } - *(*Tu32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Collate)) + *(*Tu32)(unsafe.Pointer(pNew + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Collate)) if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_InnerON)) != uint32(0) { _sqlite3SetJoinExpr(tls, pNew, *(*int32)(unsafe.Pointer(pExpr + 52)), (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_InnerON))) } @@ -122439,7 +122768,7 @@ func _srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSr } if i != iExcept { if !(int32(*(*uint32)(unsafe.Pointer(pItem + 24 + 4))&0x80>>7) != 0) || *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*TSrcItem)(unsafe.Pointer(pItem)).FiCursor+int32(1))*4)) == 0 { - v3 = pParse + 56 + v3 = pParse + 60 v2 = *(*int32)(unsafe.Pointer(v3)) *(*int32)(unsafe.Pointer(v3))++ *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*TSrcItem)(unsafe.Pointer(pItem)).FiCursor+int32(1))*4)) = v2 @@ -122629,9 +122958,9 @@ func _compoundHasDifferentAffinities(tls *libc.TLS, p uintptr) (r int32) { // ** from 2015-02-09.) // ** // ** (3) If the subquery is the right operand of a LEFT JOIN then -// ** (3a) the subquery may not be a join and -// ** (3b) the FROM clause of the subquery may not contain a virtual -// ** table and +// ** (3a) the subquery may not be a join +// ** (**) Was (3b): "the FROM clause of the subquery may not contain +// ** a virtual table" // ** (**) Was: "The outer query may not have a GROUP BY." This case // ** is now managed correctly // ** (3d) the outer query may not be DISTINCT. @@ -122843,7 +123172,7 @@ func _flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isA ** See also tickets #306, #350, and #3300. */ if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(libc.Int32FromInt32(JT_OUTER)|libc.Int32FromInt32(JT_LTORJ)) != 0 { - if (*TSrcList)(unsafe.Pointer(pSubSrc)).FnSrc > int32(1) || libc.Int32FromUint8((*TTable)(unsafe.Pointer((*(*TSrcItem)(unsafe.Pointer(pSubSrc + 8))).FpSTab)).FeTabType) == int32(TABTYP_VTAB) || (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) != uint32(0) || libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&int32(JT_RIGHT) != 0 { + if (*TSrcList)(unsafe.Pointer(pSubSrc)).FnSrc > int32(1) || (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) != uint32(0) || libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&int32(JT_RIGHT) != 0 { return 0 } isOuterJoin = int32(1) @@ -122990,7 +123319,7 @@ func _flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isA if pNew == uintptr(0) { (*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior } else { - v5 = pParse + 148 + v5 = pParse + 132 *(*int32)(unsafe.Pointer(v5))++ v4 = *(*int32)(unsafe.Pointer(v5)) (*TSelect)(unsafe.Pointer(pNew)).FselId = libc.Uint32FromInt32(v4) @@ -123280,7 +123609,7 @@ func _constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr ; i++ } - if int32(_sqlite3ExprAffinity(tls, pColumn)) == int32(SQLITE_AFF_BLOB) { + if int32(_sqlite3ExprAffinity(tls, pColumn)) <= int32(SQLITE_AFF_BLOB) { (*TWhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob = int32(1) } (*TWhereConst)(unsafe.Pointer(pConst)).FnConst++ @@ -123349,7 +123678,7 @@ func _propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintp if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_COLUMN) { return WRC_Continue } - if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&(uint32(EP_FixedCol)|(*TWhereConst)(unsafe.Pointer(pConst)).FmExcludeOn) != uint32(0) { + if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&(libc.Uint32FromInt32(EP_FixedCol)|(*TWhereConst)(unsafe.Pointer(pConst)).FmExcludeOn) != uint32(0) { return WRC_Continue } i = 0 @@ -123367,12 +123696,12 @@ func _propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintp if int32((*TExpr)(unsafe.Pointer(pColumn)).FiColumn) != int32((*TExpr)(unsafe.Pointer(pExpr)).FiColumn) { goto _1 } - if bIgnoreAffBlob != 0 && int32(_sqlite3ExprAffinity(tls, pColumn)) == int32(SQLITE_AFF_BLOB) { + if bIgnoreAffBlob != 0 && int32(_sqlite3ExprAffinity(tls, pColumn)) <= int32(SQLITE_AFF_BLOB) { break } /* A match is found. Add the EP_FixedCol property */ (*TWhereConst)(unsafe.Pointer(pConst)).FnChng++ - *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Leaf)) + *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Leaf)) *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_FixedCol)) (*TExpr)(unsafe.Pointer(pExpr)).FpLeft = _sqlite3ExprDup(tls, (*TParse)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, *(*uintptr)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr(i*int32(2)+int32(1))*8)), 0) if (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb)).FmallocFailed != 0 { @@ -123854,7 +124183,7 @@ func _disableUnusedSubqueryResultColumns(tls *libc.TLS, pItem uintptr) (r int32) goto _6 } (*TExpr)(unsafe.Pointer(pY)).Fop = uint8(TK_NULL) - *(*Tu32)(unsafe.Pointer(pY + 4)) &= libc.Uint32FromInt32(^(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Unlikely))) + *(*Tu32)(unsafe.Pointer(pY + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Unlikely)) *(*Tu32)(unsafe.Pointer(pX + 4)) |= uint32(SF_PushDown) nChng++ goto _6 @@ -123900,13 +124229,13 @@ func _minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) (r return libc.Uint8FromInt32(eRet) } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15707) == 0 { + if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15759) == 0 { eRet = int32(WHERE_ORDERBY_MIN) if _sqlite3ExprCanBeNull(tls, (*(*TExprList_item)(unsafe.Pointer(pEList + 8))).FpExpr) != 0 { sortFlags = uint8(KEYINFO_ORDER_BIGNULL) } } else { - if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15711) == 0 { + if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15763) == 0 { eRet = int32(WHERE_ORDERBY_MAX) sortFlags = uint8(KEYINFO_ORDER_DESC) } else { @@ -123994,8 +124323,8 @@ func _sqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r in pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext } if !(pIdx != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19798, libc.VaList(bp+8, zIndexedBy, 0)) - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19870, libc.VaList(bp+8, zIndexedBy, 0)) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) return int32(SQLITE_ERROR) } *(*uintptr)(unsafe.Pointer(pFrom + 56)) = pIdx @@ -124019,7 +124348,7 @@ func _sqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r in // ** above that generates the code for a compound SELECT with an ORDER BY clause // ** uses a merge algorithm that requires the same collating sequence on the // ** result columns as on the ORDER BY clause. See ticket -// ** http://www.sqlite.org/src/info/6709574d2a +// ** http://sqlite.org/src/info/6709574d2a // ** // ** This transformation is only needed for EXCEPT, INTERSECT, and UNION. // ** The UNION ALL operator works fine with multiSelectOrderBy() even when @@ -124101,7 +124430,7 @@ func _convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) (*TSelect)(unsafe.Pointer(p)).FpNext = uintptr(0) (*TSelect)(unsafe.Pointer(p)).FpWith = uintptr(0) (*TSelect)(unsafe.Pointer(p)).FpWinDefn = uintptr(0) - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Compound)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Compound) *(*Tu32)(unsafe.Pointer(p + 4)) |= uint32(SF_Converted) (*TSelect)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pNew)).FpPrior)).FpNext = pNew (*TSelect)(unsafe.Pointer(pNew)).FpLimit = uintptr(0) @@ -124119,7 +124448,7 @@ func _cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) if int32(*(*uint32)(unsafe.Pointer(pFrom + 24 + 4))&0x8>>3) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19816, libc.VaList(bp+8, (*TSrcItem)(unsafe.Pointer(pFrom)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19888, libc.VaList(bp+8, (*TSrcItem)(unsafe.Pointer(pFrom)).FzName)) return int32(1) } return 0 @@ -124267,7 +124596,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom if _cannotBeFunction(tls, pParse, pFrom) != 0 { return int32(2) } - pTab = _sqlite3DbMallocZero(tls, db, uint64(104)) + pTab = _sqlite3DbMallocZero(tls, db, uint64(120)) if pTab == uintptr(0) { return int32(2) } @@ -124295,7 +124624,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pSel = (*TSubquery)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pFrom + 72)))).FpSelect *(*Tu32)(unsafe.Pointer(pSel + 4)) |= uint32(SF_CopyCte) if int32(*(*uint32)(unsafe.Pointer(pFrom + 24 + 4))&0x2>>1) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19839, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pFrom + 48)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19911, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pFrom + 48)))) return int32(2) } libc.SetBitFieldPtr32Uint32(pFrom+24+4, libc.Uint32FromInt32(1), 9, 0x200) @@ -124317,12 +124646,12 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom (*TTable)(unsafe.Pointer(pTab)).FnTabRef++ libc.SetBitFieldPtr32Uint32(pItem+24+4, libc.Uint32FromInt32(1), 7, 0x80) if (*TSelect)(unsafe.Pointer(pRecTerm)).FselFlags&uint32(SF_Recursive) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19859, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19931, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName)) return int32(2) } *(*Tu32)(unsafe.Pointer(pRecTerm + 4)) |= uint32(SF_Recursive) if iRecTab < 0 { - v4 = pParse + 56 + v4 = pParse + 60 v3 = *(*int32)(unsafe.Pointer(v4)) *(*int32)(unsafe.Pointer(v4))++ iRecTab = v3 @@ -124339,7 +124668,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom } pRecTerm = (*TSelect)(unsafe.Pointer(pRecTerm)).FpPrior } - (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19902 + (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19974 pSavedWith = (*TParse)(unsafe.Pointer(pParse)).FpWith (*TParse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp)) if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_Recursive) != 0 { @@ -124370,7 +124699,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*TSelect)(unsafe.Pointer(pLeft)).FpEList if (*TCte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*TExprList)(unsafe.Pointer(pEList)).FnExpr != (*TExprList)(unsafe.Pointer((*TCte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19925, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName, (*TExprList)(unsafe.Pointer(pEList)).FnExpr, (*TExprList)(unsafe.Pointer((*TCte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19997, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName, (*TExprList)(unsafe.Pointer(pEList)).FnExpr, (*TExprList)(unsafe.Pointer((*TCte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*TParse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return int32(2) } @@ -124379,9 +124708,9 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom _sqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+54, pTab+8) if bMayRecursive != 0 { if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_Recursive) != 0 { - (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19963 + (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 20035 } else { - (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19997 + (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 20069 } _sqlite3WalkSelect(tls, pWalker, pSel) } @@ -124430,7 +124759,7 @@ func _sqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r int var v2 int32 _, _, _, _ = pSel, pTab, v1, v2 pSel = (*TSubquery)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pFrom + 72)))).FpSelect - v1 = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(104)) + v1 = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(120)) pTab = v1 (*TSrcItem)(unsafe.Pointer(pFrom)).FpSTab = v1 if pTab == uintptr(0) { @@ -124440,7 +124769,7 @@ func _sqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r int if (*TSrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*TTable)(unsafe.Pointer(pTab)).FzName = _sqlite3DbStrDup(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*TSrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*TTable)(unsafe.Pointer(pTab)).FzName = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+20035, libc.VaList(bp+8, pFrom)) + (*TTable)(unsafe.Pointer(pTab)).FzName = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+20107, libc.VaList(bp+8, pFrom)) } for (*TSelect)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*TSelect)(unsafe.Pointer(pSel)).FpPrior @@ -124536,7 +124865,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { } if (*TWalker)(unsafe.Pointer(pWalker)).FeCode != 0 { /* Renumber selId because it has been copied from a view */ - v2 = pParse + 148 + v2 = pParse + 132 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) (*TSelect)(unsafe.Pointer(p)).FselId = libc.Uint32FromInt32(v1) @@ -124545,7 +124874,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { pEList = (*TSelect)(unsafe.Pointer(p)).FpEList if (*TParse)(unsafe.Pointer(pParse)).FpWith != 0 && (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_View) != 0 { if (*TSelect)(unsafe.Pointer(p)).FpWith == uintptr(0) { - (*TSelect)(unsafe.Pointer(p)).FpWith = _sqlite3DbMallocZero(tls, db, uint64(64)) + (*TSelect)(unsafe.Pointer(p)).FpWith = _sqlite3DbMallocZero(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+16)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(48))) if (*TSelect)(unsafe.Pointer(p)).FpWith == uintptr(0) { return int32(WRC_Abort) } @@ -124596,7 +124925,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { return int32(WRC_Abort) } if (*TTable)(unsafe.Pointer(pTab)).FnTabRef >= uint32(0xffff) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20039, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20111, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) (*TSrcItem)(unsafe.Pointer(pFrom)).FpSTab = uintptr(0) return int32(WRC_Abort) } @@ -124611,7 +124940,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) { if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*TTable)(unsafe.Pointer(pTab)).FpSchema != (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FpSchema { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20078, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20150, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) } _sqlite3SrcItemAttachSubquery(tls, pParse, pFrom, (*(*struct { FpSelect uintptr @@ -124626,7 +124955,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { FazArg uintptr Fp uintptr })(unsafe.Pointer(pTab + 64))).Fp)).FeVtabRisk) > libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15266, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15291, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName)) } } nCol = (*TTable)(unsafe.Pointer(pTab)).FnCol @@ -124750,7 +125079,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { if iDb >= 0 { v10 = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName } else { - v10 = __ccgo_ts + 6718 + v10 = __ccgo_ts + 6743 } zSchemaName = v10 } @@ -124767,7 +125096,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { pNew = _sqlite3ExprListAppend(tls, pParse, pNew, pRight) if pNew != 0 { pX = pNew + 8 + uintptr((*TExprList)(unsafe.Pointer(pNew)).FnExpr-int32(1))*32 - (*TExprList_item)(unsafe.Pointer(pX)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20109, libc.VaList(bp+8, zUName)) + (*TExprList_item)(unsafe.Pointer(pX)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20181, libc.VaList(bp+8, zUName)) libc.SetBitFieldPtr16Uint32(pX+16+4, libc.Uint32FromInt32(ENAME_TAB), 0, 0x3) libc.SetBitFieldPtr16Uint32(pX+16+4, libc.Uint32FromInt32(1), 7, 0x80) } @@ -124846,7 +125175,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { if pNestedFrom != 0 && libc.Bool(libc.Bool(!(libc.Int32FromInt32(ViewCanHaveRowid) != 0)) || j < (*TExprList)(unsafe.Pointer(pNestedFrom)).FnExpr) { (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3DbStrDup(tls, db, (*(*TExprList_item)(unsafe.Pointer(pNestedFrom + 8 + uintptr(j)*32))).FzEName) } else { - (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20114, libc.VaList(bp+8, zSchemaName, zTabName, zName)) + (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20186, libc.VaList(bp+8, zSchemaName, zTabName, zName)) } if j == int32((*TTable)(unsafe.Pointer(pTab1)).FnCol) { v13 = int32(ENAME_ROWID) @@ -124859,7 +125188,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { } } else { if longNames != 0 { - (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+12570, libc.VaList(bp+8, zTabName, zName)) + (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+12595, libc.VaList(bp+8, zTabName, zName)) libc.SetBitFieldPtr16Uint32(pX1+16+4, libc.Uint32FromInt32(ENAME_NAME), 0, 0x3) } else { (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3DbStrDup(tls, db, zName) @@ -124879,9 +125208,9 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { } if !(tableSeen != 0) { if zTName != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20123, libc.VaList(bp+8, zTName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20195, libc.VaList(bp+8, zTName)) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20141, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20213, 0) } } } @@ -124895,7 +125224,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) { } if (*TSelect)(unsafe.Pointer(p)).FpEList != 0 { if (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20161, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20233, 0) return int32(WRC_Abort) } if elistFlags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_HasFunc)|libc.Int32FromInt32(EP_Subquery)) != uint32(0) { @@ -125144,7 +125473,7 @@ func _aggregateIdxEprRefToColCallback(tls *libc.TLS, pWalker uintptr, pExpr uint (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_AGG_COLUMN) (*TExpr)(unsafe.Pointer(pExpr)).FiTable = (*TAggInfo_col)(unsafe.Pointer(pCol)).FiTable (*TExpr)(unsafe.Pointer(pExpr)).FiColumn = (*TAggInfo_col)(unsafe.Pointer(pCol)).FiColumn - *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Collate) | libc.Int32FromInt32(EP_Unlikely))) + *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Collate) | libc.Int32FromInt32(EP_Unlikely)) return int32(WRC_Prune) } @@ -125197,7 +125526,7 @@ func _aggregateConvertIndexedExprRefToColumn(tls *libc.TLS, pAggInfo uintptr) { // */ func _assignAggregateRegisters(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { (*TAggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc + *(*int32)(unsafe.Pointer(pParse + 64)) += (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc } // C documentation @@ -125234,12 +125563,12 @@ func _resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { if (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct >= 0 { pE = (*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFExpr if *(*uintptr)(unsafe.Pointer(pE + 32)) == uintptr(0) || (*TExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32)))).FnExpr != int32(1) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20192, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20264, 0) (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -int32(1) } else { pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32)), 0, 0) (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = _sqlite3VdbeAddOp4(tls, v, int32(OP_OpenEphemeral), (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -int32(8)) - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20243, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20315, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } if (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiOBTab >= 0 { @@ -125260,7 +125589,7 @@ func _resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { (*TKeyInfo)(unsafe.Pointer(pKeyInfo1)).FnKeyField++ } _sqlite3VdbeAddOp4(tls, v, int32(OP_OpenEphemeral), (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiOBTab, (*TExprList)(unsafe.Pointer(pOBList)).FnExpr+nExtra, 0, pKeyInfo1, -int32(8)) - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20276, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20348, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } goto _1 _1: @@ -125399,7 +125728,7 @@ func _updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo ui ** without a FILTER clause that will ensure the magnet registers ** are populated. */ if regHit == 0 { - v3 = pParse + 60 + v3 = pParse + 64 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) regHit = v2 @@ -125507,7 +125836,7 @@ func _updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo ui pColl = (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl } if regHit == 0 && (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0 { - v8 = pParse + 60 + v8 = pParse + 64 *(*int32)(unsafe.Pointer(v8))++ v7 = *(*int32)(unsafe.Pointer(v8)) regHit = v7 @@ -125574,7 +125903,7 @@ func _explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintp if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fexplain) == int32(2) { bCover = libc.BoolInt32(pIdx != uintptr(0) && ((*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) || !(int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0)) == libc.Int32FromInt32(SQLITE_IDXTYPE_PRIMARYKEY)))) if bCover != 0 { - v1 = __ccgo_ts + 20309 + v1 = __ccgo_ts + 20381 } else { v1 = __ccgo_ts + 1665 } @@ -125583,7 +125912,7 @@ func _explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintp } else { v2 = __ccgo_ts + 1665 } - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20332, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, v1, v2)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20404, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, v1, v2)) } } @@ -125615,7 +125944,7 @@ func _havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int3 ** statements AggInfo structure. */ if _sqlite3ExprIsConstantOrGroupBy(tls, (*TWalker)(unsafe.Pointer(pWalker)).FpParse, pExpr, (*TSelect)(unsafe.Pointer(pS)).FpGroupBy) != 0 && libc.BoolInt32((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_IsFalse)) == uint32(EP_IsFalse)) == 0 && (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { db = (*TParse)(unsafe.Pointer((*TWalker)(unsafe.Pointer(pWalker)).FpParse)).Fdb - pNew = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8319) + pNew = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8344) if pNew != 0 { pWhere = (*TSelect)(unsafe.Pointer(pS)).FpWhere t = *(*TExpr)(unsafe.Pointer(pNew)) @@ -125773,7 +126102,7 @@ func _countOfViewOptimization(tls *libc.TLS, pParse uintptr, p uintptr) (r int32 if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_AGG_FUNCTION) { return 0 } /* Result is an aggregate */ - if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), __ccgo_ts+16001) != 0 { + if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), __ccgo_ts+16073) != 0 { return 0 } /* Is count() */ if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != uintptr(0) { @@ -125818,13 +126147,13 @@ func _countOfViewOptimization(tls *libc.TLS, pParse uintptr, p uintptr) (r int32 pExpr = uintptr(0) pSub = _sqlite3SubqueryDetach(tls, db, pFrom) _sqlite3SrcListDelete(tls, db, (*TSelect)(unsafe.Pointer(p)).FpSrc) - (*TSelect)(unsafe.Pointer(p)).FpSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(88)) + (*TSelect)(unsafe.Pointer(p)).FpSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt64(80))) for pSub != 0 { pPrior = (*TSelect)(unsafe.Pointer(pSub)).FpPrior (*TSelect)(unsafe.Pointer(pSub)).FpPrior = uintptr(0) (*TSelect)(unsafe.Pointer(pSub)).FpNext = uintptr(0) *(*Tu32)(unsafe.Pointer(pSub + 4)) |= uint32(SF_Aggregate) - *(*Tu32)(unsafe.Pointer(pSub + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Compound)) + *(*Tu32)(unsafe.Pointer(pSub + 4)) &= ^libc.Uint32FromInt32(SF_Compound) (*TSelect)(unsafe.Pointer(pSub)).FnSelectRow = 0 _sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_sqlite3ExprListDeleteGeneric), (*TSelect)(unsafe.Pointer(pSub)).FpEList) if pPrior != 0 { @@ -125844,7 +126173,7 @@ func _countOfViewOptimization(tls *libc.TLS, pParse uintptr, p uintptr) (r int32 pSub = pPrior } (*(*TExprList_item)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList + 8))).FpExpr = pExpr - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Aggregate)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Aggregate) return int32(1) } @@ -126017,8 +126346,8 @@ func _fromClauseTermCanBeCoroutine(tls *libc.TLS, pParse uintptr, pTabList uintp func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r int32) { bp := tls.Alloc(208) defer tls.Free(208) - var addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iUseFlag, ii, ii1, isAgg, j, k, nCol, nGroupBy, onceAddr, orderByGrp, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortOut, sortPTab, topAddr, v12, v15, v19, v24, v26, v27, v32, v33, v34, v36, v38, v40, v42, v44, v45, v49, v50, v54, v58, v60 int32 - var db, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, v, zDb, zSavedAuthContext, v1, v13, v14, v16, v17, v20, v25, v28, v3, v35, v37, v39, v41, v43, v46, v51, v53, v55, v59, p10, p23, p4, p5, p7, p8 uintptr + var addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iUseFlag, ii, ii1, isAgg, j, k, nCol, nGroupBy, onceAddr, orderByGrp, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortOut, sortPTab, topAddr, v12, v15, v19, v24, v26, v28, v33, v34, v35, v37, v39, v41, v43, v45, v46, v50, v51, v55, v59, v61 int32 + var db, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, v, zDb, zSavedAuthContext, v1, v13, v14, v16, v17, v20, v25, v29, v3, v36, v38, v40, v42, v44, v47, v52, v54, v56, v60, p10, p23, p27, p4, p5, p7, p8 uintptr var distFlag, distFlag1, wctrlFlags Tu16 var iRoot TPgno var minMaxFlag, sortFlags Tu8 @@ -126027,11 +126356,11 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r var _ /* sDistinct at bp+0 */ TDistinctCtx var _ /* sNC at bp+112 */ TNameContext var _ /* sSort at bp+16 */ TSortCtx - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, db, distFlag, distFlag1, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iRoot, iUseFlag, ii, ii1, isAgg, j, k, minMaxFlag, nCol, nGroupBy, onceAddr, orderByGrp, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortFlags, sortOut, sortPTab, topAddr, v, wctrlFlags, zDb, zSavedAuthContext, v1, v12, v13, v14, v15, v16, v17, v19, v20, v24, v25, v26, v27, v28, v3, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v49, v50, v51, v53, v54, v55, v58, v59, v60, p10, p23, p4, p5, p7, p8 /* True for select lists like "count(*)" */ - pEList = uintptr(0) /* The HAVING clause. May be NULL */ - pAggInfo = uintptr(0) /* Aggregate information */ - rc = int32(1) /* The database connection */ - *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) /* Flag for min/max queries */ + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, db, distFlag, distFlag1, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iRoot, iUseFlag, ii, ii1, isAgg, j, k, minMaxFlag, nCol, nGroupBy, onceAddr, orderByGrp, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortFlags, sortOut, sortPTab, topAddr, v, wctrlFlags, zDb, zSavedAuthContext, v1, v12, v13, v14, v15, v16, v17, v19, v20, v24, v25, v26, v28, v29, v3, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v50, v51, v52, v54, v55, v56, v59, v60, v61, p10, p23, p27, p4, p5, p7, p8 /* True for select lists like "count(*)" */ + pEList = uintptr(0) /* The HAVING clause. May be NULL */ + pAggInfo = uintptr(0) /* Aggregate information */ + rc = int32(1) /* The database connection */ + *(*uintptr)(unsafe.Pointer(bp + 64)) = uintptr(0) /* Flag for min/max queries */ db = (*TParse)(unsafe.Pointer(pParse)).Fdb v = _sqlite3GetVdbe(tls, pParse) if p == uintptr(0) || (*TParse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -126047,7 +126376,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r _sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_sqlite3ExprListDeleteGeneric), (*TSelect)(unsafe.Pointer(p)).FpOrderBy) (*TSelect)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) } - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Distinct)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Distinct) *(*Tu32)(unsafe.Pointer(p + 4)) |= uint32(SF_NoopOrderBy) } _sqlite3SelectPrep(tls, pParse, p, uintptr(0)) @@ -126071,14 +126400,14 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r } else { v1 = (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(p0)).FpSTab)).FzName } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20344, libc.VaList(bp+176, v1)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20416, libc.VaList(bp+176, v1)) goto select_end } /* Clear the SF_UFSrcCheck flag. The check has already been performed, ** and leaving this flag set can cause errors if a compound sub-query ** in p->pSrc is flattened into this query and this function called ** again as part of compound SELECT processing. */ - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_UFSrcCheck)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_UFSrcCheck) } if libc.Int32FromUint8((*TSelectDest)(unsafe.Pointer(pDest)).FeDest) == int32(SRT_Output) { _sqlite3GenerateColumnNames(tls, pParse, p) @@ -126179,7 +126508,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r /* Catch mismatch in the declared columns of a view and the number of ** columns in the SELECT on the RHS */ if int32((*TTable)(unsafe.Pointer(pTab)).FnCol) != (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSub)).FpEList)).FnExpr { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20398, libc.VaList(bp+176, int32((*TTable)(unsafe.Pointer(pTab)).FnCol), (*TTable)(unsafe.Pointer(pTab)).FzName, (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20470, libc.VaList(bp+176, int32((*TTable)(unsafe.Pointer(pTab)).FnCol), (*TTable)(unsafe.Pointer(pTab)).FzName, (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end } /* Do not attempt the usual optimizations (flattening and ORDER BY @@ -126380,14 +126709,14 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r ** set on each invocation. tag-select-0482 */ addrTop = _sqlite3VdbeCurrentAddr(tls, v) + int32(1) - v13 = pParse + 60 + v13 = pParse + 64 *(*int32)(unsafe.Pointer(v13))++ v12 = *(*int32)(unsafe.Pointer(v13)) (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn = v12 _sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn, 0, addrTop) (*TSubquery)(unsafe.Pointer(pSubq)).FaddrFillSub = addrTop _sqlite3SelectDestInit(tls, bp+72, int32(SRT_Coroutine), (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn) - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20438, libc.VaList(bp+176, pItem1)) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20510, libc.VaList(bp+176, pItem1)) _sqlite3Select(tls, pParse, pSub1, bp+72) (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem1)).FpSTab)).FnRowLogEst = (*TSelect)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr32Uint32(pItem1+24+4, libc.Uint32FromInt32(1), 6, 0x40) @@ -126419,7 +126748,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r (*TSelect)(unsafe.Pointer(pSub1)).FnSelectRow = (*TSelect)(unsafe.Pointer((*TSubquery)(unsafe.Pointer(pPriorSubq)).FpSelect)).FnSelectRow } else { onceAddr = 0 - v16 = pParse + 60 + v16 = pParse + 64 *(*int32)(unsafe.Pointer(v16))++ v15 = *(*int32)(unsafe.Pointer(v16)) (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn = v15 @@ -126434,7 +126763,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r } else { } _sqlite3SelectDestInit(tls, bp+72, int32(SRT_EphemTab), (*TSrcItem)(unsafe.Pointer(pItem1)).FiCursor) - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20453, libc.VaList(bp+176, pItem1)) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20525, libc.VaList(bp+176, pItem1)) _sqlite3Select(tls, pParse, pSub1, bp+72) (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem1)).FpSTab)).FnRowLogEst = (*TSelect)(unsafe.Pointer(pSub1)).FnSelectRow if onceAddr != 0 { @@ -126488,7 +126817,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r ** BY and DISTINCT, and an index or separate temp-table for the other. */ if (*TSelect)(unsafe.Pointer(p)).FselFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SF_Distinct)|libc.Int32FromInt32(SF_Aggregate)) == uint32(SF_Distinct) && _sqlite3ExprListCompare(tls, (*(*TSortCtx)(unsafe.Pointer(bp + 16))).FpOrderBy, pEList, -int32(1)) == 0 && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_GroupByOrder)) == uint32(0) && (*TSelect)(unsafe.Pointer(p)).FpWin == uintptr(0) { - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Distinct)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Distinct) v17 = _sqlite3ExprListDup(tls, db, pEList, 0) (*TSelect)(unsafe.Pointer(p)).FpGroupBy = v17 pGroupBy = v17 @@ -126521,7 +126850,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r */ if (*(*TSortCtx)(unsafe.Pointer(bp + 16))).FpOrderBy != 0 { pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, (*(*TSortCtx)(unsafe.Pointer(bp + 16))).FpOrderBy, 0, (*TExprList)(unsafe.Pointer(pEList)).FnExpr) - v20 = pParse + 56 + v20 = pParse + 60 v19 = *(*int32)(unsafe.Pointer(v20)) *(*int32)(unsafe.Pointer(v20))++ (*(*TSortCtx)(unsafe.Pointer(bp + 16))).FiECursor = v19 @@ -126580,7 +126909,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r /* Open an ephemeral index to use for the distinct set. tag-select-0680 */ if (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) != 0 { - v25 = pParse + 56 + v25 = pParse + 60 v24 = *(*int32)(unsafe.Pointer(v25)) *(*int32)(unsafe.Pointer(v25))++ (*(*TDistinctCtx)(unsafe.Pointer(bp))).FtabTnct = v24 @@ -126609,6 +126938,13 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r } if int32(_sqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*TSelect)(unsafe.Pointer(p)).FnSelectRow) { (*TSelect)(unsafe.Pointer(p)).FnSelectRow = _sqlite3WhereOutputRowCount(tls, pWInfo) + if libc.Int32FromUint8((*TSelectDest)(unsafe.Pointer(pDest)).FeDest) <= int32(SRT_DistQueue) && libc.Int32FromUint8((*TSelectDest)(unsafe.Pointer(pDest)).FeDest) >= int32(SRT_DistFifo) { + /* TUNING: For a UNION CTE, because UNION is implies DISTINCT, + ** reduce the estimated output row count by 8 (LogEst 30). + ** Search for tag-20250414a to see other cases */ + p27 = p + 2 + *(*TLogEst)(unsafe.Pointer(p27)) = TLogEst(int32(*(*TLogEst)(unsafe.Pointer(p27))) - libc.Int32FromInt32(30)) + } } if (*(*TDistinctCtx)(unsafe.Pointer(bp))).FisTnct != 0 && _sqlite3WhereIsDistinct(tls, pWInfo) != 0 { (*(*TDistinctCtx)(unsafe.Pointer(bp))).FeTnctType = libc.Uint8FromInt32(_sqlite3WhereIsDistinct(tls, pWInfo)) @@ -126631,10 +126967,10 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r addrGosub = _sqlite3VdbeMakeLabel(tls, pParse) iCont = _sqlite3VdbeMakeLabel(tls, pParse) iBreak = _sqlite3VdbeMakeLabel(tls, pParse) - v28 = pParse + 60 - *(*int32)(unsafe.Pointer(v28))++ - v27 = *(*int32)(unsafe.Pointer(v28)) - regGosub = v27 + v29 = pParse + 64 + *(*int32)(unsafe.Pointer(v29))++ + v28 = *(*int32)(unsafe.Pointer(v29)) + regGosub = v28 _sqlite3WindowCodeStep(tls, pParse, p, pWInfo, regGosub, addrGosub) _sqlite3VdbeAddOp2(tls, v, int32(OP_Goto), 0, iBreak) _sqlite3VdbeResolveLabel(tls, v, addrGosub) @@ -126668,8 +127004,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r FiOrderByCol Tu16 FiAlias Tu16 })(unsafe.Pointer(pItem2 + 24))).FiAlias = uint16(0) - goto _29 - _29: + goto _30 + _30: ; k-- pItem2 += 32 @@ -126684,8 +127020,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r FiOrderByCol Tu16 FiAlias Tu16 })(unsafe.Pointer(pItem2 + 24))).FiAlias = uint16(0) - goto _30 - _30: + goto _31 + _31: ; k-- pItem2 += 32 @@ -126714,8 +127050,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r } sortFlags = libc.Uint8FromInt32(libc.Int32FromUint8((*(*TExprList_item)(unsafe.Pointer((*(*TSortCtx)(unsafe.Pointer(bp + 16))).FpOrderBy + 8 + uintptr(ii1)*32))).Ffg.FsortFlags) & int32(KEYINFO_ORDER_DESC)) (*(*TExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*32))).Ffg.FsortFlags = sortFlags - goto _31 - _31: + goto _32 + _32: ; ii1++ } @@ -126745,11 +127081,11 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r (*(*TNameContext)(unsafe.Pointer(bp + 112))).FpSrcList = pTabList *(*uintptr)(unsafe.Pointer(bp + 112 + 16)) = pAggInfo if pGroupBy != 0 { - v32 = (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr + v33 = (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr } else { - v32 = 0 + v33 = 0 } - (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = libc.Uint16FromInt32(v32) + (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = libc.Uint16FromInt32(v33) (*TAggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy = pGroupBy _sqlite3ExprAnalyzeAggList(tls, bp+112, pEList) _sqlite3ExprAnalyzeAggList(tls, bp+112, (*(*TSortCtx)(unsafe.Pointer(bp + 16))).FpOrderBy) @@ -126783,47 +127119,47 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r pDistinct = _sqlite3ExprListDup(tls, db, pGroupBy, 0) pDistinct = _sqlite3ExprListAppend(tls, pParse, pDistinct, pExpr) if pDistinct != 0 { - v33 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT) + v34 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT) } else { - v33 = 0 + v34 = 0 } - distFlag = libc.Uint16FromInt32(v33) + distFlag = libc.Uint16FromInt32(v34) } /* If there is a GROUP BY clause we might need a sorting index to ** implement it. Allocate that sorting index now. If it turns out ** that we do not need it after all, the OP_SorterOpen instruction ** will be converted into a Noop. */ - v35 = pParse + 56 - v34 = *(*int32)(unsafe.Pointer(v35)) - *(*int32)(unsafe.Pointer(v35))++ - (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = v34 + v36 = pParse + 60 + v35 = *(*int32)(unsafe.Pointer(v36)) + *(*int32)(unsafe.Pointer(v36))++ + (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = v35 pKeyInfo1 = _sqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, 0, (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) addrSortingIdx = _sqlite3VdbeAddOp4(tls, v, int32(OP_SorterOpen), (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, libc.Int32FromUint16((*TAggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn), 0, pKeyInfo1, -int32(8)) /* Initialize memory locations used by GROUP BY aggregate processing */ - v37 = pParse + 60 - *(*int32)(unsafe.Pointer(v37))++ - v36 = *(*int32)(unsafe.Pointer(v37)) - iUseFlag = v36 - v39 = pParse + 60 - *(*int32)(unsafe.Pointer(v39))++ - v38 = *(*int32)(unsafe.Pointer(v39)) - iAbortFlag = v38 - v41 = pParse + 60 - *(*int32)(unsafe.Pointer(v41))++ - v40 = *(*int32)(unsafe.Pointer(v41)) - regOutputRow = v40 + v38 = pParse + 64 + *(*int32)(unsafe.Pointer(v38))++ + v37 = *(*int32)(unsafe.Pointer(v38)) + iUseFlag = v37 + v40 = pParse + 64 + *(*int32)(unsafe.Pointer(v40))++ + v39 = *(*int32)(unsafe.Pointer(v40)) + iAbortFlag = v39 + v42 = pParse + 64 + *(*int32)(unsafe.Pointer(v42))++ + v41 = *(*int32)(unsafe.Pointer(v42)) + regOutputRow = v41 addrOutputRow = _sqlite3VdbeMakeLabel(tls, pParse) - v43 = pParse + 60 - *(*int32)(unsafe.Pointer(v43))++ - v42 = *(*int32)(unsafe.Pointer(v43)) - regReset = v42 + v44 = pParse + 64 + *(*int32)(unsafe.Pointer(v44))++ + v43 = *(*int32)(unsafe.Pointer(v44)) + regReset = v43 addrReset = _sqlite3VdbeMakeLabel(tls, pParse) iAMem = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr + *(*int32)(unsafe.Pointer(pParse + 64)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr iBMem = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr + *(*int32)(unsafe.Pointer(pParse + 64)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, iAbortFlag) _sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, iAMem, iAMem+(*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr-int32(1)) /* Begin a loop that will extract all source rows in GROUP BY order. @@ -126833,16 +127169,16 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r */ _sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), regReset, addrReset) if libc.Int32FromUint8((*(*TDistinctCtx)(unsafe.Pointer(bp))).FisTnct) == int32(2) { - v44 = int32(WHERE_DISTINCTBY) + v45 = int32(WHERE_DISTINCTBY) } else { - v44 = int32(WHERE_GROUPBY) + v45 = int32(WHERE_GROUPBY) } if orderByGrp != 0 { - v45 = int32(WHERE_SORTBYGROUP) + v46 = int32(WHERE_SORTBYGROUP) } else { - v45 = 0 + v46 = 0 } - pWInfo = _sqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, p, libc.Uint16FromInt32(v44|v45|libc.Int32FromUint16(distFlag)), 0) + pWInfo = _sqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, p, libc.Uint16FromInt32(v45|v46|libc.Int32FromUint16(distFlag)), 0) if pWInfo == uintptr(0) { _sqlite3ExprListDelete(tls, db, pDistinct) goto select_end @@ -126860,11 +127196,11 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r groupBySort = 0 } else { if (*(*TDistinctCtx)(unsafe.Pointer(bp))).FisTnct != 0 && (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) == uint32(0) { - v46 = __ccgo_ts + 20469 + v47 = __ccgo_ts + 20541 } else { - v46 = __ccgo_ts + 20478 + v47 = __ccgo_ts + 20550 } - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19321, libc.VaList(bp+176, v46)) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19393, libc.VaList(bp+176, v47)) groupBySort = int32(1) nGroupBy = (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr nCol = nGroupBy @@ -126878,8 +127214,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r nCol++ j++ } - goto _47 - _47: + goto _48 + _48: ; i++ } @@ -126897,8 +127233,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r _sqlite3ExprCode(tls, pParse, (*TAggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase) j++ } - goto _48 - _48: + goto _49 + _49: ; i++ } @@ -126909,12 +127245,12 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r _sqlite3ReleaseTempReg(tls, pParse, regRecord) _sqlite3ReleaseTempRange(tls, pParse, regBase, nCol) _sqlite3WhereEnd(tls, pWInfo) - v51 = pParse + 56 - v50 = *(*int32)(unsafe.Pointer(v51)) - *(*int32)(unsafe.Pointer(v51))++ - v49 = v50 - sortPTab = v49 - (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab = v49 + v52 = pParse + 60 + v51 = *(*int32)(unsafe.Pointer(v52)) + *(*int32)(unsafe.Pointer(v52))++ + v50 = v51 + sortPTab = v50 + (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab = v50 sortOut = _sqlite3GetTempReg(tls, pParse) _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenPseudo), sortPTab, sortOut, nCol) _sqlite3VdbeAddOp2(tls, v, int32(OP_SorterSort), (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd) @@ -126963,12 +127299,16 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r if iOrderByCol != 0 { pX = (*(*TExprList_item)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList + 8 + uintptr(iOrderByCol-int32(1))*32))).FpExpr pBase = _sqlite3ExprSkipCollateAndLikely(tls, pX) + for pBase != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pBase)).Fop) == int32(TK_IF_NULL_ROW) { + pX = (*TExpr)(unsafe.Pointer(pBase)).FpLeft + pBase = _sqlite3ExprSkipCollateAndLikely(tls, pX) + } if pBase != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pBase)).Fop) != int32(TK_AGG_COLUMN) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pBase)).Fop) != int32(TK_REGISTER) { _sqlite3ExprToRegister(tls, pX, iAMem+j) } } - goto _52 - _52: + goto _53 + _53: ; j++ } @@ -127038,9 +127378,9 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r _fixDistinctOpenEph(tls, pParse, eDist, (*TAggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*TAggInfo_func)(unsafe.Pointer(pF)).FiDistAddr) } } else { - v53 = _isSimpleCount(tls, p, pAggInfo) - pTab1 = v53 - if v53 != uintptr(0) { + v54 = _isSimpleCount(tls, p, pAggInfo) + pTab1 = v54 + if v54 != uintptr(0) { /* tag-select-0821 ** ** If isSimpleCount() returns a pointer to a Table structure, then @@ -127057,10 +127397,10 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r ** always spread across less pages than their corresponding tables. */ iDb1 = _sqlite3SchemaToIndex(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*TTable)(unsafe.Pointer(pTab1)).FpSchema) - v55 = pParse + 56 - v54 = *(*int32)(unsafe.Pointer(v55)) - *(*int32)(unsafe.Pointer(v55))++ - iCsr = v54 /* Iterator variable */ + v56 = pParse + 60 + v55 = *(*int32)(unsafe.Pointer(v56)) + *(*int32)(unsafe.Pointer(v56))++ + iCsr = v55 /* Iterator variable */ pKeyInfo2 = uintptr(0) /* Keyinfo for scanned index */ pBest = uintptr(0) /* Best index found so far */ iRoot = (*TTable)(unsafe.Pointer(pTab1)).Ftnum /* Root page of scanned b-tree */ @@ -127087,8 +127427,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x4>>2)) == 0 && int32((*TIndex)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*TTable)(unsafe.Pointer(pTab1)).FszTabRow) && (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) && (!(pBest != 0) || int32((*TIndex)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*TIndex)(unsafe.Pointer(pBest)).FszIdxRow)) { pBest = pIdx } - goto _56 - _56: + goto _57 + _57: ; pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext } @@ -127128,32 +127468,32 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r break } if (*TExpr)(unsafe.Pointer((*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32))).FpFExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc)) != uint32(0) { - goto _57 + goto _58 } if (*TFuncDef)(unsafe.Pointer((*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32))).FpFunc)).FfuncFlags&uint32(SQLITE_FUNC_NEEDCOLL) != 0 { break } - goto _57 - _57: + goto _58 + _58: ; i++ } if i == (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc { - v59 = pParse + 60 - *(*int32)(unsafe.Pointer(v59))++ - v58 = *(*int32)(unsafe.Pointer(v59)) - regAcc = v58 + v60 = pParse + 64 + *(*int32)(unsafe.Pointer(v60))++ + v59 = *(*int32)(unsafe.Pointer(v60)) + regAcc = v59 _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regAcc) } } else { if (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == int32(1) && (*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc))).FiDistinct >= 0 { pDistinct1 = *(*uintptr)(unsafe.Pointer((*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc))).FpFExpr + 32)) if pDistinct1 != 0 { - v60 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT) + v61 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT) } else { - v60 = 0 + v61 = 0 } - distFlag1 = libc.Uint16FromInt32(v60) + distFlag1 = libc.Uint16FromInt32(v61) } } _assignAggregateRegisters(tls, pParse, pAggInfo) @@ -127195,7 +127535,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r _sqlite3VdbeResolveLabel(tls, v, addrEnd) } /* endif aggregate query */ if libc.Int32FromUint8((*(*TDistinctCtx)(unsafe.Pointer(bp))).FeTnctType) == int32(WHERE_DISTINCT_UNORDERED) { - _explainTempTable(tls, pParse, __ccgo_ts+20469) + _explainTempTable(tls, pParse, __ccgo_ts+20541) } /* If there is an ORDER BY clause, then we need to sort the results ** and send them to the callback one by one. tag-select-0900 @@ -127301,7 +127641,7 @@ func _sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr if !(i < nCol) { break } - z = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) + z = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8)))) if z == uintptr(0) { goto malloc_failed } @@ -127317,7 +127657,7 @@ func _sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr } else { if libc.Int32FromUint32((*TTabResult)(unsafe.Pointer(p)).FnColumn) != nCol { Xsqlite3_free(tls, (*TTabResult)(unsafe.Pointer(p)).FzErrMsg) - (*TTabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+20487, 0) + (*TTabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+20559, 0) (*TTabResult)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) return int32(1) } @@ -127407,7 +127747,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp if (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg != 0 { if pzErrMsg != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErrMsg))) - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+48, (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+48, (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg)) } Xsqlite3_free(tls, (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg) } @@ -127569,7 +127909,7 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if isTemp != 0 { /* If TEMP was specified, then the trigger name may not be qualified. */ if (*TToken)(unsafe.Pointer(pName2)).Fn > uint32(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20552, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20624, 0) goto trigger_cleanup } iDb = int32(1) @@ -127609,7 +127949,7 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { goto trigger_cleanup } - _sqlite3FixInit(tls, bp+8, pParse, iDb, __ccgo_ts+20598, *(*uintptr)(unsafe.Pointer(bp))) + _sqlite3FixInit(tls, bp+8, pParse, iDb, __ccgo_ts+20670, *(*uintptr)(unsafe.Pointer(bp))) if _sqlite3FixSrcList(tls, bp+8, pTableName) != 0 { goto trigger_cleanup } @@ -127619,11 +127959,11 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 goto trigger_orphan_error } if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20606, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20678, 0) goto trigger_orphan_error } if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Shadow) != uint32(0) && _sqlite3ReadOnlyShadowTables(tls, db) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20647, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20719, 0) goto trigger_orphan_error } /* Check that the trigger name is not reserved and that no trigger of the @@ -127632,13 +127972,13 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if zName == uintptr(0) { goto trigger_cleanup } - if _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+20598, (*TTable)(unsafe.Pointer(pTab)).FzName) != 0 { + if _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+20670, (*TTable)(unsafe.Pointer(pTab)).FzName) != 0 { goto trigger_cleanup } if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) { if _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FpSchema+56, zName) != 0 { if !(noErr != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20687, libc.VaList(bp+112, *(*uintptr)(unsafe.Pointer(bp)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20759, libc.VaList(bp+112, *(*uintptr)(unsafe.Pointer(bp)))) } else { _sqlite3CodeVerifySchema(tls, pParse, iDb) } @@ -127646,8 +127986,8 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 } } /* Do not create a trigger on a system table */ - if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6653, int32(7)) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20713, 0) + if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6678, int32(7)) == 0 { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20785, 0) goto trigger_cleanup } /* INSTEAD of triggers are only for views and views only support INSTEAD @@ -127655,15 +127995,15 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 */ if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) && tr_tm != int32(TK_INSTEAD) { if tr_tm == int32(TK_BEFORE) { - v1 = __ccgo_ts + 20751 + v1 = __ccgo_ts + 20823 } else { - v1 = __ccgo_ts + 20758 + v1 = __ccgo_ts + 20830 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20764, libc.VaList(bp+112, v1, pTableName+8)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20836, libc.VaList(bp+112, v1, pTableName+8)) goto trigger_orphan_error } if !(libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == libc.Int32FromInt32(TABTYP_VIEW)) && tr_tm == int32(TK_INSTEAD) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20801, libc.VaList(bp+112, pTableName+8)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20873, libc.VaList(bp+112, pTableName+8)) goto trigger_orphan_error } if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) { @@ -127683,9 +128023,9 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 goto trigger_cleanup } if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iTabDb == int32(1) { - v3 = __ccgo_ts + 6661 + v3 = __ccgo_ts + 6686 } else { - v3 = __ccgo_ts + 6149 + v3 = __ccgo_ts + 6173 } if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_INSERT), v3, uintptr(0), zDb) != 0 { goto trigger_cleanup @@ -127785,7 +128125,7 @@ func _sqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAl pStepList = (*TTriggerStep)(unsafe.Pointer(pStepList)).FpNext } _sqlite3TokenInit(tls, bp+96, (*TTrigger)(unsafe.Pointer(pTrig)).FzName) - _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+20598, bp+96) + _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+20670, bp+96) if _sqlite3FixTriggerStep(tls, bp, (*TTrigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || _sqlite3FixExpr(tls, bp, (*TTrigger)(unsafe.Pointer(pTrig)).FpWhen) != 0 { goto triggerfinish_cleanup } @@ -127807,7 +128147,7 @@ func _sqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAl break } if (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget != uintptr(0) && _sqlite3ShadowTableName(tls, db, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20847, libc.VaList(bp+120, (*TTrigger)(unsafe.Pointer(pTrig)).FzName, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20919, libc.VaList(bp+120, (*TTrigger)(unsafe.Pointer(pTrig)).FzName, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget)) goto triggerfinish_cleanup } goto _1 @@ -127823,10 +128163,10 @@ func _sqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAl } _sqlite3BeginWriteOperation(tls, pParse, 0, iDb) z = _sqlite3DbStrNDup(tls, db, (*TToken)(unsafe.Pointer(pAll)).Fz, uint64((*TToken)(unsafe.Pointer(pAll)).Fn)) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+20895, libc.VaList(bp+120, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zName, (*TTrigger)(unsafe.Pointer(pTrig)).Ftable, z)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+20967, libc.VaList(bp+120, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, zName, (*TTrigger)(unsafe.Pointer(pTrig)).Ftable, z)) _sqlite3DbFree(tls, db, z) _sqlite3ChangeCookie(tls, pParse, iDb) - _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+20970, libc.VaList(bp+120, zName)), uint16(0)) + _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+21042, libc.VaList(bp+120, zName)), uint16(0)) } } if (*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 { @@ -128094,11 +128434,11 @@ func _sqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int } if !(pTrigger != 0) { if !(noErr != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20999, libc.VaList(bp+8, pName+8)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21071, libc.VaList(bp+8, pName+8)) } else { _sqlite3CodeVerifyNamedSchema(tls, pParse, zDb) } - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) goto drop_trigger_cleanup } _sqlite3DropTriggerPtr(tls, pParse, pTrigger) @@ -128136,9 +128476,9 @@ func _sqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { code = int32(SQLITE_DROP_TRIGGER) zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) { - v1 = __ccgo_ts + 6661 + v1 = __ccgo_ts + 6686 } else { - v1 = __ccgo_ts + 6149 + v1 = __ccgo_ts + 6173 } zTab = v1 if iDb == int32(1) { @@ -128153,7 +128493,7 @@ func _sqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { v2 = _sqlite3GetVdbe(tls, pParse) v = v2 if v2 != uintptr(0) { - _sqlite3NestedParse(tls, pParse, __ccgo_ts+21019, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+21091, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName)) _sqlite3ChangeCookie(tls, pParse, iDb) _sqlite3VdbeAddOp4(tls, v, int32(OP_DropTrigger), iDb, 0, 0, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName, 0) } @@ -128286,11 +128626,11 @@ func _triggersReallyExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { if op != int32(TK_INSERT) { if op == int32(TK_DELETE) { - v1 = __ccgo_ts + 21081 + v1 = __ccgo_ts + 21153 } else { - v1 = __ccgo_ts + 21088 + v1 = __ccgo_ts + 21160 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21095, libc.VaList(bp+8, v1)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21167, libc.VaList(bp+8, v1)) } (*TTrigger)(unsafe.Pointer(p)).Ftr_tm = uint8(TRIGGER_BEFORE) } else { @@ -128392,7 +128732,7 @@ func _isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) (r int32) { if libc.Int32FromUint8((*TExpr)(unsafe.Pointer((*TExpr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != int32(TK_ASTERISK) { return 0 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21143, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21215, 0) return int32(1) } @@ -128540,12 +128880,12 @@ func _sqlite3ProcessReturningSubqueries(tls *libc.TLS, pEList uintptr, pTab uint func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { bp := tls.Alloc(272) defer tls.Free(272) - var db, pCol, pNew, pReturning, v, v2 uintptr + var db, pCol, pFrom, pNew, pReturning, v, v2 uintptr var i, nCol, reg, v1 int32 - var _ /* sFrom at bp+128 */ TSrcList + var _ /* fromSpace at bp+128 */ [88]Tu8 var _ /* sNC at bp+216 */ TNameContext var _ /* sSelect at bp+0 */ TSelect - _, _, _, _, _, _, _, _, _, _ = db, i, nCol, pCol, pNew, pReturning, reg, v, v1, v2 + _, _, _, _, _, _, _, _, _, _, _ = db, i, nCol, pCol, pFrom, pNew, pReturning, reg, v, v1, v2 v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe db = (*TParse)(unsafe.Pointer(pParse)).Fdb if !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) { @@ -128553,19 +128893,22 @@ func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab ** this statement lacks a RETURNING clause. */ return } - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 208)) + pReturning = (*(*struct { + FpReturning uintptr + })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning if pTrigger != pReturning+16 { /* This RETURNING trigger is for a different statement */ return } libc.Xmemset(tls, bp, 0, uint64(128)) - libc.Xmemset(tls, bp+128, 0, uint64(88)) + pFrom = bp + 128 + libc.Xmemset(tls, pFrom, 0, uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt64(80)) (*(*TSelect)(unsafe.Pointer(bp))).FpEList = _sqlite3ExprListDup(tls, db, (*TReturning)(unsafe.Pointer(pReturning)).FpReturnEL, 0) - (*(*TSelect)(unsafe.Pointer(bp))).FpSrc = bp + 128 - (*(*TSrcList)(unsafe.Pointer(bp + 128))).FnSrc = int32(1) - (*(*TSrcItem)(unsafe.Pointer(bp + 128 + 8))).FpSTab = pTab - (*(*TSrcItem)(unsafe.Pointer(bp + 128 + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName /* tag-20240424-1 */ - (*(*TSrcItem)(unsafe.Pointer(bp + 128 + 8))).FiCursor = -int32(1) + (*(*TSelect)(unsafe.Pointer(bp))).FpSrc = pFrom + (*TSrcList)(unsafe.Pointer(pFrom)).FnSrc = int32(1) + (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).FpSTab = pTab + (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName /* tag-20240424-1 */ + (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).FiCursor = -int32(1) _sqlite3SelectPrep(tls, pParse, bp, uintptr(0)) if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 { _sqlite3GenerateColumnNames(tls, pParse, bp) @@ -128576,7 +128919,7 @@ func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab libc.Xmemset(tls, bp+216, 0, uint64(56)) if (*TReturning)(unsafe.Pointer(pReturning)).FnRetCol == 0 { (*TReturning)(unsafe.Pointer(pReturning)).FnRetCol = (*TExprList)(unsafe.Pointer(pNew)).FnExpr - v2 = pParse + 56 + v2 = pParse + 60 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ (*TReturning)(unsafe.Pointer(pReturning)).FiRetCur = v1 @@ -128590,7 +128933,7 @@ func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab nCol = (*TExprList)(unsafe.Pointer(pNew)).FnExpr reg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) _sqlite3ProcessReturningSubqueries(tls, pNew, pTab) - *(*int32)(unsafe.Pointer(pParse + 60)) += nCol + int32(2) + *(*int32)(unsafe.Pointer(pParse + 64)) += nCol + int32(2) (*TReturning)(unsafe.Pointer(pReturning)).FiRetReg = reg i = 0 for { @@ -128658,7 +129001,7 @@ func _codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orcon } (*TParse)(unsafe.Pointer(pParse)).FeOrconf = libc.Uint8FromInt32(v2) if (*TTriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { - _sqlite3VdbeAddOp4(tls, v, int32(OP_Trace), int32(0x7fffffff), int32(1), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+6346, libc.VaList(bp+48, (*TTriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -int32(6)) + _sqlite3VdbeAddOp4(tls, v, int32(OP_Trace), int32(0x7fffffff), int32(1), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+6370, libc.VaList(bp+48, (*TTriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -int32(6)) } switch libc.Int32FromUint8((*TTriggerStep)(unsafe.Pointer(pStep)).Fop) { case int32(TK_UPDATE): @@ -128757,10 +129100,12 @@ func _codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintp (*(*TParse)(unsafe.Pointer(bp + 56))).FeTriggerOp = (*TTrigger)(unsafe.Pointer(pTrigger)).Fop (*(*TParse)(unsafe.Pointer(bp + 56))).FnQueryLoop = (*TParse)(unsafe.Pointer(pParse)).FnQueryLoop (*(*TParse)(unsafe.Pointer(bp + 56))).FprepFlags = (*TParse)(unsafe.Pointer(pParse)).FprepFlags + (*(*TParse)(unsafe.Pointer(bp + 56))).Foldmask = uint32(0) + (*(*TParse)(unsafe.Pointer(bp + 56))).Fnewmask = uint32(0) v = _sqlite3GetVdbe(tls, bp+56) if v != 0 { if (*TTrigger)(unsafe.Pointer(pTrigger)).FzName != 0 { - _sqlite3VdbeChangeP4(tls, v, -int32(1), _sqlite3MPrintf(tls, db, __ccgo_ts+21185, libc.VaList(bp+488, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName)), -int32(6)) + _sqlite3VdbeChangeP4(tls, v, -int32(1), _sqlite3MPrintf(tls, db, __ccgo_ts+21257, libc.VaList(bp+488, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName)), -int32(6)) } /* If one was specified, code the WHEN clause. If it evaluates to false ** (or NULL) the sub-vdbe is immediately halted by jumping to the @@ -128782,7 +129127,7 @@ func _codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintp _sqlite3VdbeAddOp0(tls, v, int32(OP_Halt)) _transferParseError(tls, pParse, bp+56) if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 { - (*TSubProgram)(unsafe.Pointer(pProgram)).FaOp = _sqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+144) + (*TSubProgram)(unsafe.Pointer(pProgram)).FaOp = _sqlite3VdbeTakeOpArray(tls, v, pProgram+8, pTop+128) } (*TSubProgram)(unsafe.Pointer(pProgram)).FnMem = (*(*TParse)(unsafe.Pointer(bp + 56))).FnMem (*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*(*TParse)(unsafe.Pointer(bp + 56))).FnTab @@ -128854,7 +129199,7 @@ func _sqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab ** is a pointer to the sub-vdbe containing the trigger program. */ if pPrg != 0 { bRecursive = libc.BoolInt32((*TTrigger)(unsafe.Pointer(p)).FzName != 0 && uint64(0) == (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_RecTriggers)) - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) _sqlite3VdbeAddOp4(tls, v, int32(OP_Program), reg, ignoreJump, v1, (*TTriggerPrg)(unsafe.Pointer(pPrg)).FpProgram, -int32(4)) @@ -129270,13 +129615,13 @@ func _updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, p func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { bp := tls.Alloc(128) defer tls.Free(128) - var aRegIdx, aToOpen, aXRef, db, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, v, v11, v16, v19, v21, v24, v26, v29, v31, v34, v37, v39, v4, v5 uintptr - var addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, eOnePass, flags, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, newmask, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v1, v15, v18, v2, v20, v22, v23, v25, v27, v28, v3, v30, v32, v33, v35, v36, v38, v41, v46, v48, v49 int32 - var chngKey, chngPk, chngRowid, hCol, v8 Tu8 + var aRegIdx, aToOpen, aXRef, db, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, v, v10, v15, v18, v20, v23, v25, v28, v30, v33, v36, v38, v4, v5 uintptr + var addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, eOnePass, flags, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, newmask, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v1, v14, v17, v19, v2, v21, v22, v24, v26, v27, v29, v3, v31, v32, v34, v35, v37, v40, v45, v47, v48 int32 + var chngKey, chngPk, chngRowid, v8 Tu8 var colFlags, oldmask Tu32 var nPk Ti16 - var v13 uint64 - var v43 uint32 + var v12 uint64 + var v42 uint32 var _ /* aiCurOnePass at bp+80 */ [2]int32 var _ /* bReplace at bp+88 */ int32 var _ /* iNotUsed1 at bp+92 */ int32 @@ -129284,21 +129629,21 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui var _ /* sContext at bp+0 */ TAuthContext var _ /* sNC at bp+16 */ TNameContext var _ /* tmask at bp+72 */ int32 - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aToOpen, aXRef, addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, chngKey, chngPk, chngRowid, colFlags, db, eOnePass, flags, hCol, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, nPk, newmask, oldmask, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v, v1, v11, v13, v15, v16, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v4, v41, v43, v46, v48, v49, v5, v8 /* The table to be updated */ - addrTop = 0 /* VDBE instruction address of the start of the loop */ - pWInfo = uintptr(0) /* The database structure */ - aRegIdx = uintptr(0) /* Registers for to each index and the main table */ - aXRef = uintptr(0) /* Either chngPk or chngRowid */ - pRowidExpr = uintptr(0) /* Expression defining the new record number */ - iRowidExpr = -int32(1) /* Mask of NEW.* columns accessed by BEFORE triggers */ - iEph = 0 /* Ephemeral table holding all primary key values */ - nKey = 0 /* The write cursors opened by WHERE_ONEPASS */ - addrOpen = 0 /* Address of OP_OpenEphemeral */ - iPk = 0 /* First of nPk cells holding PRIMARY KEY value */ - nPk = 0 /* Number of components of the PRIMARY KEY */ - *(*int32)(unsafe.Pointer(bp + 88)) = 0 /* True if REPLACE conflict resolution might happen */ - bFinishSeek = int32(1) /* The OP_FinishSeek opcode is needed */ - nChangeFrom = 0 /* If there is a FROM, pChanges->nExpr, else 0 */ + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aToOpen, aXRef, addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, chngKey, chngPk, chngRowid, colFlags, db, eOnePass, flags, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, nPk, newmask, oldmask, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v, v1, v10, v12, v14, v15, v17, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v4, v40, v42, v45, v47, v48, v5, v8 /* The table to be updated */ + addrTop = 0 /* VDBE instruction address of the start of the loop */ + pWInfo = uintptr(0) /* The database structure */ + aRegIdx = uintptr(0) /* Registers for to each index and the main table */ + aXRef = uintptr(0) /* Either chngPk or chngRowid */ + pRowidExpr = uintptr(0) /* Expression defining the new record number */ + iRowidExpr = -int32(1) /* Mask of NEW.* columns accessed by BEFORE triggers */ + iEph = 0 /* Ephemeral table holding all primary key values */ + nKey = 0 /* The write cursors opened by WHERE_ONEPASS */ + addrOpen = 0 /* Address of OP_OpenEphemeral */ + iPk = 0 /* First of nPk cells holding PRIMARY KEY value */ + nPk = 0 /* Number of components of the PRIMARY KEY */ + *(*int32)(unsafe.Pointer(bp + 88)) = 0 /* True if REPLACE conflict resolution might happen */ + bFinishSeek = int32(1) /* The OP_FinishSeek opcode is needed */ + nChangeFrom = 0 /* If there is a FROM, pChanges->nExpr, else 0 */ /* Register Allocations */ regRowCount = 0 /* A count of rows changed */ regOldRowid = 0 /* The old rowid */ @@ -129345,7 +129690,7 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui ** need to occur right after the database cursor. So go ahead and ** allocate enough space, just in case. */ - v4 = pParse + 56 + v4 = pParse + 60 v3 = *(*int32)(unsafe.Pointer(v4)) *(*int32)(unsafe.Pointer(v4))++ v2 = v3 @@ -129428,58 +129773,46 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui if !(i < (*TExprList)(unsafe.Pointer(pChanges)).FnExpr) { break } - hCol = _sqlite3StrIHash(tls, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FzEName) /* If this is an UPDATE with a FROM clause, do not resolve expressions ** here. The call to sqlite3Select() below will do that. */ if nChangeFrom == 0 && _sqlite3ResolveExprNames(tls, bp+16, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FpExpr) != 0 { goto update_cleanup } - j = 0 - for { - if !(j < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } - if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FhName) == libc.Int32FromUint8(hCol) && _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FzEName) == 0 { - if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { - chngRowid = uint8(1) - pRowidExpr = (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FpExpr - iRowidExpr = i + j = _sqlite3ColumnIndex(tls, pTab, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FzEName) + if j >= 0 { + if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) { + chngRowid = uint8(1) + pRowidExpr = (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FpExpr + iRowidExpr = i + } else { + if pPk != 0 && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 { + chngPk = uint8(1) } else { - if pPk != 0 && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 { - chngPk = uint8(1) - } else { - if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FcolFlags)&int32(COLFLAG_GENERATED) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21199, libc.VaList(bp+112, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName)) - goto update_cleanup - } + if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FcolFlags)&int32(COLFLAG_GENERATED) != 0 { + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21271, libc.VaList(bp+112, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName)) + goto update_cleanup } } - *(*int32)(unsafe.Pointer(aXRef + uintptr(j)*4)) = i - break } - goto _10 - _10: - ; - j++ - } - if j >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { + *(*int32)(unsafe.Pointer(aXRef + uintptr(j)*4)) = i + } else { if pPk == uintptr(0) && _sqlite3IsRowid(tls, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FzEName) != 0 { j = -int32(1) chngRowid = uint8(1) pRowidExpr = (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FpExpr iRowidExpr = i } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21235, libc.VaList(bp+112, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FzEName)) - (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21307, libc.VaList(bp+112, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*32))).FzEName)) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 3, 0x8) goto update_cleanup } } if j < 0 { - v11 = __ccgo_ts + 8094 + v10 = __ccgo_ts + 8119 } else { - v11 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName + v10 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16))).FzCnName } - rc = _sqlite3AuthCheck(tls, pParse, int32(SQLITE_UPDATE), (*TTable)(unsafe.Pointer(pTab)).FzName, v11, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName) + rc = _sqlite3AuthCheck(tls, pParse, int32(SQLITE_UPDATE), (*TTable)(unsafe.Pointer(pTab)).FzName, v10, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName) if rc == int32(SQLITE_DENY) { goto update_cleanup } else { @@ -129509,17 +129842,17 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui break } if *(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) >= 0 { - goto _12 + goto _11 } if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*16))).FcolFlags)&int32(COLFLAG_GENERATED) == 0 { - goto _12 + goto _11 } if _sqlite3ExprReferencesUpdatedColumn(tls, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*16), aXRef, libc.Int32FromUint8(chngRowid)) != 0 { *(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) = int32(99999) bProgress = int32(1) } - goto _12 - _12: + goto _11 + _11: ; i++ } @@ -129531,11 +129864,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui ** table implementation makes all columns available). */ if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) { - v13 = libc.Uint64FromInt32(-libc.Int32FromInt32(1)) + v12 = libc.Uint64FromInt32(-libc.Int32FromInt32(1)) } else { - v13 = uint64(0) + v12 = uint64(0) } - (*(*TSrcItem)(unsafe.Pointer(pTabList + 8))).FcolUsed = v13 + (*(*TSrcItem)(unsafe.Pointer(pTabList + 8))).FcolUsed = v12 hasFK = _sqlite3FkRequired(tls, pParse, pTab, aXRef, libc.Int32FromUint8(chngKey)) /* There is one entry in the aRegIdx[] array for each index on the table ** being updated. Fill in aRegIdx[] with a register number that will hold @@ -129551,11 +129884,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui break } if chngKey != 0 || hasFK > int32(1) || pIdx == pPk || _indexWhereClauseMightChange(tls, pIdx, aXRef, libc.Int32FromUint8(chngRowid)) != 0 { - v16 = pParse + 60 - *(*int32)(unsafe.Pointer(v16))++ - v15 = *(*int32)(unsafe.Pointer(v16)) - reg = v15 - *(*int32)(unsafe.Pointer(pParse + 60)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) + v15 = pParse + 64 + *(*int32)(unsafe.Pointer(v15))++ + v14 = *(*int32)(unsafe.Pointer(v15)) + reg = v14 + *(*int32)(unsafe.Pointer(pParse + 64)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) } else { reg = 0 i = 0 @@ -129564,18 +129897,18 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui break } if _indexColumnIsBeingUpdated(tls, pIdx, i, aXRef, libc.Int32FromUint8(chngRowid)) != 0 { - v19 = pParse + 60 - *(*int32)(unsafe.Pointer(v19))++ - v18 = *(*int32)(unsafe.Pointer(v19)) - reg = v18 - *(*int32)(unsafe.Pointer(pParse + 60)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) + v18 = pParse + 64 + *(*int32)(unsafe.Pointer(v18))++ + v17 = *(*int32)(unsafe.Pointer(v18)) + reg = v17 + *(*int32)(unsafe.Pointer(pParse + 64)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) if onError == int32(OE_Default) && libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx)).FonError) == int32(OE_Replace) { *(*int32)(unsafe.Pointer(bp + 88)) = int32(1) } break } - goto _17 - _17: + goto _16 + _16: ; i++ } @@ -129584,16 +129917,16 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui *(*Tu8)(unsafe.Pointer(aToOpen + uintptr(nAllIdx+int32(1)))) = uint8(0) } *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = reg - goto _14 - _14: + goto _13 + _13: ; pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext nAllIdx++ } - v21 = pParse + 60 - *(*int32)(unsafe.Pointer(v21))++ - v20 = *(*int32)(unsafe.Pointer(v21)) - *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v20 /* Register storing the table record */ + v20 = pParse + 64 + *(*int32)(unsafe.Pointer(v20))++ + v19 = *(*int32)(unsafe.Pointer(v20)) + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v19 /* Register storing the table record */ if *(*int32)(unsafe.Pointer(bp + 88)) != 0 { /* If REPLACE conflict resolution might be invoked, open cursors on all ** indexes in case they are needed to delete records. */ @@ -129611,24 +129944,24 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui ** table record is written. regRowSet holds the RowSet for the ** two-pass update algorithm. */ regRowSet = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) - v24 = pParse + 60 - *(*int32)(unsafe.Pointer(v24))++ - v23 = *(*int32)(unsafe.Pointer(v24)) - v22 = v23 - regNewRowid = v22 - regOldRowid = v22 + v23 = pParse + 64 + *(*int32)(unsafe.Pointer(v23))++ + v22 = *(*int32)(unsafe.Pointer(v23)) + v21 = v22 + regNewRowid = v21 + regOldRowid = v21 if chngPk != 0 || pTrigger != 0 || hasFK != 0 { regOld = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) } if chngKey != 0 || pTrigger != 0 || hasFK != 0 { - v26 = pParse + 60 - *(*int32)(unsafe.Pointer(v26))++ - v25 = *(*int32)(unsafe.Pointer(v26)) - regNewRowid = v25 + v25 = pParse + 64 + *(*int32)(unsafe.Pointer(v25))++ + v24 = *(*int32)(unsafe.Pointer(v25)) + regNewRowid = v24 } regNew = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) } /* Start the view context. */ if isView != 0 { @@ -129654,50 +129987,50 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui goto update_cleanup } /* Jump to labelBreak to abandon further processing of this UPDATE */ - v27 = _sqlite3VdbeMakeLabel(tls, pParse) - labelBreak = v27 - labelContinue = v27 + v26 = _sqlite3VdbeMakeLabel(tls, pParse) + labelBreak = v26 + labelContinue = v26 /* Not an UPSERT. Normal processing. Begin by ** initialize the count of updated rows */ if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32)) != uint64(0) && !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) && !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) && pUpsert == uintptr(0) { - v29 = pParse + 60 - *(*int32)(unsafe.Pointer(v29))++ - v28 = *(*int32)(unsafe.Pointer(v29)) - regRowCount = v28 + v28 = pParse + 64 + *(*int32)(unsafe.Pointer(v28))++ + v27 = *(*int32)(unsafe.Pointer(v28)) + regRowCount = v27 _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regRowCount) } if nChangeFrom == 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) { _sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, regRowSet, regOldRowid) - v31 = pParse + 56 - v30 = *(*int32)(unsafe.Pointer(v31)) - *(*int32)(unsafe.Pointer(v31))++ - iEph = v30 + v30 = pParse + 60 + v29 = *(*int32)(unsafe.Pointer(v30)) + *(*int32)(unsafe.Pointer(v30))++ + iEph = v29 addrOpen = _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenEphemeral), iEph, 0, regRowSet) } else { if pPk != 0 { - v32 = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) + v31 = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) } else { - v32 = 0 + v31 = 0 } - nPk = int16(v32) + nPk = int16(v31) iPk = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(nPk) - *(*int32)(unsafe.Pointer(pParse + 60)) += nChangeFrom - v34 = pParse + 60 - *(*int32)(unsafe.Pointer(v34))++ - v33 = *(*int32)(unsafe.Pointer(v34)) - regKey = v33 + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(nPk) + *(*int32)(unsafe.Pointer(pParse + 64)) += nChangeFrom + v33 = pParse + 64 + *(*int32)(unsafe.Pointer(v33))++ + v32 = *(*int32)(unsafe.Pointer(v33)) + regKey = v32 if pUpsert == uintptr(0) { if isView != 0 { - v35 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + v34 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol) } else { - v35 = 0 + v34 = 0 } - nEphCol = int32(nPk) + nChangeFrom + v35 - v37 = pParse + 56 - v36 = *(*int32)(unsafe.Pointer(v37)) - *(*int32)(unsafe.Pointer(v37))++ - iEph = v36 + nEphCol = int32(nPk) + nChangeFrom + v34 + v36 = pParse + 60 + v35 = *(*int32)(unsafe.Pointer(v36)) + *(*int32)(unsafe.Pointer(v36))++ + iEph = v35 if pPk != 0 { _sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, iPk, iPk+int32(nPk)-int32(1)) } @@ -129781,10 +130114,10 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui ** leave it in register regOldRowid. */ _sqlite3VdbeAddOp2(tls, v, int32(OP_Rowid), iDataCur, regOldRowid) if eOnePass == ONEPASS_OFF { - v39 = pParse + 60 - *(*int32)(unsafe.Pointer(v39))++ - v38 = *(*int32)(unsafe.Pointer(v39)) - *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v38 + v38 = pParse + 64 + *(*int32)(unsafe.Pointer(v38))++ + v37 = *(*int32)(unsafe.Pointer(v38)) + *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v37 _sqlite3VdbeAddOp3(tls, v, int32(OP_Insert), iEph, regRowSet, regOldRowid) } else { if addrOpen != 0 { @@ -129803,8 +130136,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui break } _sqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iDataCur, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))), iPk+i) - goto _40 - _40: + goto _39 + _39: ; i++ } @@ -129854,11 +130187,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui labelContinue = _sqlite3VdbeMakeLabel(tls, pParse) } if pPk != 0 { - v41 = regKey + v40 = regKey } else { - v41 = regOldRowid + v40 = regOldRowid } - _sqlite3VdbeAddOp2(tls, v, int32(OP_IsNull), v41, labelBreak) + _sqlite3VdbeAddOp2(tls, v, int32(OP_IsNull), v40, labelBreak) } else { if pPk != 0 || nChangeFrom != 0 { labelContinue = _sqlite3VdbeMakeLabel(tls, pParse) @@ -129873,8 +130206,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui break } _sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iEph, i, iPk+i) - goto _42 - _42: + goto _41 + _41: ; i++ } @@ -129912,11 +130245,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui ** information is needed */ if chngPk != 0 || hasFK != 0 || pTrigger != 0 { if hasFK != 0 { - v43 = _sqlite3FkOldmask(tls, pParse, pTab) + v42 = _sqlite3FkOldmask(tls, pParse, pTab) } else { - v43 = uint32(0) + v42 = uint32(0) } - oldmask = v43 + oldmask = v42 oldmask |= _sqlite3TriggerColmask(tls, pParse, pTrigger, pChanges, 0, libc.Int32FromInt32(TRIGGER_BEFORE)|libc.Int32FromInt32(TRIGGER_AFTER), pTab, onError) i = 0 for { @@ -129930,8 +130263,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui } else { _sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, k) } - goto _44 - _44: + goto _43 + _43: ; i++ } @@ -129971,11 +130304,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui if j >= 0 { if nChangeFrom != 0 { if isView != 0 { - v46 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + v45 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol) } else { - v46 = int32(nPk) + v45 = int32(nPk) } - nOff = v46 + nOff = v45 _sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iEph, nOff+j, k) } else { _sqlite3ExprCode(tls, pParse, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(j)*32))).FpExpr, k) @@ -129995,8 +130328,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui } } } - goto _45 - _45: + goto _44 + _44: ; i++ k++ @@ -130046,8 +130379,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui _sqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iDataCur, i, k) } } - goto _47 - _47: + goto _46 + _46: ; i++ k++ @@ -130094,11 +130427,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui ** is the column index supplied by the user. */ if hasFK > int32(1) || chngKey != 0 { - v48 = 0 + v47 = 0 } else { - v48 = int32(OPFLAG_ISNOOP) + v47 = int32(OPFLAG_ISNOOP) } - _sqlite3VdbeAddOp3(tls, v, int32(OP_Delete), iDataCur, int32(OPFLAG_ISUPDATE)|v48, regNewRowid) + _sqlite3VdbeAddOp3(tls, v, int32(OP_Delete), iDataCur, int32(OPFLAG_ISUPDATE)|v47, regNewRowid) if eOnePass == int32(ONEPASS_MULTI) { _sqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SAVEPOSITION)) } @@ -130110,11 +130443,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui } /* Insert the new index entries and the new record. */ if eOnePass == int32(ONEPASS_MULTI) { - v49 = int32(OPFLAG_SAVEPOSITION) + v48 = int32(OPFLAG_SAVEPOSITION) } else { - v49 = 0 + v48 = 0 } - _sqlite3CompleteInsertion(tls, pParse, pTab, iDataCur, iIdxCur, regNewRowid, aRegIdx, int32(OPFLAG_ISUPDATE)|v49, 0, 0) + _sqlite3CompleteInsertion(tls, pParse, pTab, iDataCur, iIdxCur, regNewRowid, aRegIdx, int32(OPFLAG_ISUPDATE)|v48, 0, 0) /* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to ** handle rows (possibly in other tables) that refer via a foreign key ** to the row just updated. */ @@ -130157,7 +130490,7 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui ** that information. */ if regRowCount != 0 { - _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+21254) + _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+21326) } goto update_cleanup update_cleanup: @@ -130214,13 +130547,13 @@ func _updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintp /* Allocate nArg registers in which to gather the arguments for VUpdate. Then ** create and open the ephemeral table in which the records created from ** these arguments will be temporarily stored. */ - v2 = pParse + 56 + v2 = pParse + 60 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ ephemTab = v1 addr = _sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), ephemTab, nArg) regArg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nArg + *(*int32)(unsafe.Pointer(pParse + 64)) += nArg if (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc > int32(1) { pPk = uintptr(0) if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) { @@ -130262,11 +130595,11 @@ func _updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintp _sqlite3ExprListDelete(tls, db, pList) eOnePass = ONEPASS_OFF } else { - v5 = pParse + 60 + v5 = pParse + 64 *(*int32)(unsafe.Pointer(v5))++ v4 = *(*int32)(unsafe.Pointer(v5)) regRec = v4 - v7 = pParse + 60 + v7 = pParse + 64 *(*int32)(unsafe.Pointer(v7))++ v6 = *(*int32)(unsafe.Pointer(v7)) regRowid = v6 @@ -130591,9 +130924,9 @@ func _sqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr if nClause == 0 && (*TUpsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { (*(*[16]int8)(unsafe.Pointer(bp + 200)))[0] = 0 } else { - Xsqlite3_snprintf(tls, int32(16), bp+200, __ccgo_ts+21267, libc.VaList(bp+224, nClause+int32(1))) + Xsqlite3_snprintf(tls, int32(16), bp+200, __ccgo_ts+21339, libc.VaList(bp+224, nClause+int32(1))) } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21271, libc.VaList(bp+224, bp+200)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21343, libc.VaList(bp+224, bp+200)) return int32(SQLITE_ERROR) } goto _1 @@ -130682,13 +131015,13 @@ func _sqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab pPk = _sqlite3PrimaryKeyIndex(tls, pTab) nPk = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) iPk = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nPk + *(*int32)(unsafe.Pointer(pParse + 64)) += nPk i = 0 for { if !(i < nPk) { break } - k = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) + k = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) _sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iCur, k, iPk+i) goto _1 _1: @@ -130696,7 +131029,7 @@ func _sqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i++ } i = _sqlite3VdbeAddOp4Int(tls, v, int32(OP_Found), iDataCur, 0, iPk, nPk) - _sqlite3VdbeAddOp4(tls, v, int32(OP_Halt), int32(SQLITE_CORRUPT), int32(OE_Abort), 0, __ccgo_ts+12659, -int32(1)) + _sqlite3VdbeAddOp4(tls, v, int32(OP_Halt), int32(SQLITE_CORRUPT), int32(OE_Abort), 0, __ccgo_ts+12684, -int32(1)) _sqlite3MayAbort(tls, pParse) _sqlite3VdbeJumpHere(tls, v, i) } @@ -130778,7 +131111,7 @@ func _execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) (r int3 ** corrupt the sqlite_schema.sql field with other kinds of statements ** then run VACUUM to get those statements to execute at inappropriate ** times. */ - if zSubSql != 0 && (libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21344, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21348, uint64(3)) == 0) { + if zSubSql != 0 && (libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21416, uint64(3)) == 0 || libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21420, uint64(3)) == 0) { rc = _execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -130869,7 +131202,7 @@ func _sqlite3Vacuum(tls *libc.TLS, pParse uintptr, _pNm uintptr, pInto uintptr) if iDb != int32(1) { iIntoReg = 0 if pInto != 0 && _sqlite3ResolveSelfReference(tls, pParse, uintptr(0), 0, pInto, uintptr(0)) == 0 { - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) iIntoReg = v1 @@ -130908,17 +131241,17 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p pDb = uintptr(0) /* Name of output file */ pgflags = uint32(PAGER_SYNCHRONOUS_OFF) /* Name of the ATTACH-ed database used for vacuum */ if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { - _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21352) + _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21424) return int32(SQLITE_ERROR) /* IMP: R-12218-18073 */ } if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeActive > int32(1) { - _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21392) + _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21464) return int32(SQLITE_ERROR) /* IMP: R-15610-35227 */ } saved_openFlags = (*Tsqlite3)(unsafe.Pointer(db)).FopenFlags if pOut != 0 { if Xsqlite3_value_type(tls, pOut) != int32(SQLITE_TEXT) { - _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21435) + _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21507) return int32(SQLITE_ERROR) } zOut = Xsqlite3_value_text(tls, pOut) @@ -130935,7 +131268,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p saved_nChange = (*Tsqlite3)(unsafe.Pointer(db)).FnChange saved_nTotalChange = (*Tsqlite3)(unsafe.Pointer(db)).FnTotalChange saved_mTrace = (*Tsqlite3)(unsafe.Pointer(db)).FmTrace - *(*Tu64)(unsafe.Pointer(db + 48)) |= libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_WriteSchema) | libc.Int32FromInt32(SQLITE_IgnoreChecks)) + *(*Tu64)(unsafe.Pointer(db + 48)) |= libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_WriteSchema)|libc.Int32FromInt32(SQLITE_IgnoreChecks)) | libc.Uint64FromInt32(libc.Int32FromInt32(0x00040))<<libc.Int32FromInt32(32) *(*Tu32)(unsafe.Pointer(db + 44)) |= libc.Uint32FromInt32(libc.Int32FromInt32(DBFLAG_PreferBuiltin) | libc.Int32FromInt32(DBFLAG_Vacuum)) *(*Tu64)(unsafe.Pointer(db + 48)) &= ^(libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_ForeignKeys)|libc.Int32FromInt32(SQLITE_ReverseOrder)|libc.Int32FromInt32(SQLITE_Defensive)) | libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32)) (*Tsqlite3)(unsafe.Pointer(db)).FmTrace = uint8(0) @@ -130957,9 +131290,9 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p ** to write the journal header file. */ Xsqlite3_randomness(tls, int32(8), bp) - Xsqlite3_snprintf(tls, int32(42), bp+8, __ccgo_ts+21453, libc.VaList(bp+80, *(*Tu64)(unsafe.Pointer(bp)))) + Xsqlite3_snprintf(tls, int32(42), bp+8, __ccgo_ts+21525, libc.VaList(bp+80, *(*Tu64)(unsafe.Pointer(bp)))) nDb = (*Tsqlite3)(unsafe.Pointer(db)).FnDb - rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21468, libc.VaList(bp+80, zOut, bp+8)) + rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21540, libc.VaList(bp+80, zOut, bp+8)) (*Tsqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if rc != SQLITE_OK { goto end_of_vacuum @@ -130971,7 +131304,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p *(*Ti64)(unsafe.Pointer(bp + 56)) = 0 if (*Tsqlite3_file)(unsafe.Pointer(id)).FpMethods != uintptr(0) && (_sqlite3OsFileSize(tls, id, bp+56) != SQLITE_OK || *(*Ti64)(unsafe.Pointer(bp + 56)) > 0) { rc = int32(SQLITE_ERROR) - _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21484) + _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21556) goto end_of_vacuum } *(*Tu32)(unsafe.Pointer(db + 44)) |= uint32(DBFLAG_VacuumInto) @@ -130988,7 +131321,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, ** to ensure that we do not try to change the page-size on a WAL database. */ - rc = _execSql(tls, db, pzErrMsg, __ccgo_ts+15036) + rc = _execSql(tls, db, pzErrMsg, __ccgo_ts+15061) if rc != SQLITE_OK { goto end_of_vacuum } @@ -131019,11 +131352,11 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p ** in the temporary database. */ (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(nDb) /* force new CREATE statements into vacuum_db */ - rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21511, libc.VaList(bp+80, zDbMain)) + rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21583, libc.VaList(bp+80, zDbMain)) if rc != SQLITE_OK { goto end_of_vacuum } - rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21619, libc.VaList(bp+80, zDbMain)) + rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21691, libc.VaList(bp+80, zDbMain)) if rc != SQLITE_OK { goto end_of_vacuum } @@ -131032,7 +131365,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p ** an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy ** the contents to the temporary database. */ - rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21673, libc.VaList(bp+80, bp+8, zDbMain, bp+8)) + rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21745, libc.VaList(bp+80, bp+8, zDbMain, bp+8)) *(*Tu32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(DBFLAG_Vacuum)) if rc != SQLITE_OK { goto end_of_vacuum @@ -131042,7 +131375,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p ** associated storage, so all we have to do is copy their entries ** from the schema table. */ - rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21810, libc.VaList(bp+80, bp+8, zDbMain)) + rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21882, libc.VaList(bp+80, bp+8, zDbMain)) if rc != 0 { goto end_of_vacuum } @@ -131569,7 +131902,7 @@ func _addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uint FazArg uintptr Fp uintptr })(unsafe.Pointer(pTable + 64))).FnArg+int32(3) >= *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12889, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12914, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = _sqlite3DbRealloc(tls, db, (*(*struct { FnArg int32 @@ -131692,24 +132025,29 @@ func _sqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { if pEnd != 0 { (*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fn = libc.Uint32FromInt32(int32(int64((*TToken)(unsafe.Pointer(pEnd)).Fz)-int64((*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fz))) + (*TToken)(unsafe.Pointer(pEnd)).Fn } - zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+21933, libc.VaList(bp+8, pParse+272)) + zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+22005, libc.VaList(bp+8, pParse+232)) /* A slot for the record has already been allocated in the ** schema table. We just need to update that slot with all ** the information we've collected. ** - ** The VM register number pParse->regRowid holds the rowid of an + ** The VM register number pParse->u1.cr.regRowid holds the rowid of an ** entry in the sqlite_schema table that was created for this vtab ** by sqlite3StartTable(). */ iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema) - _sqlite3NestedParse(tls, pParse, __ccgo_ts+21957, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt, (*TParse)(unsafe.Pointer(pParse)).FregRowid)) + _sqlite3NestedParse(tls, pParse, __ccgo_ts+22029, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32))).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt, (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FregRowid)) v = _sqlite3GetVdbe(tls, pParse) _sqlite3ChangeCookie(tls, pParse, iDb) _sqlite3VdbeAddOp0(tls, v, int32(OP_Expire)) - zWhere = _sqlite3MPrintf(tls, db, __ccgo_ts+22056, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = _sqlite3MPrintf(tls, db, __ccgo_ts+22128, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt)) _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) _sqlite3DbFree(tls, db, zStmt) - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) iReg = v1 @@ -131793,7 +132131,7 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, break } if (*TVtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { - *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22075, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(pTab)).FzName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22147, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(pTab)).FzName)) return int32(SQLITE_LOCKED) } goto _1 @@ -131835,9 +132173,9 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, } if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22117, libc.VaList(bp+48, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22189, libc.VaList(bp+48, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+3862, libc.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 32)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+3888, libc.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 32)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) } _sqlite3DbFree(tls, db, pVTable) @@ -131850,7 +132188,7 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*TModule)(unsafe.Pointer(pMod)).FnRefModule++ (*TVTable)(unsafe.Pointer(pVTable)).FnRef = int32(1) if (*(*TVtabCtx)(unsafe.Pointer(bp))).FbDeclared == 0 { - zFormat = __ccgo_ts + 22147 + zFormat = __ccgo_ts + 22219 *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+48, zModuleName)) _sqlite3VtabUnlock(tls, pVTable) rc = int32(SQLITE_ERROR) @@ -131884,7 +132222,7 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if !(i < nType) { break } - if 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+16739, zType+uintptr(i), int32(6)) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-int32(1))))) == int32(' ')) && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32('\000') || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32(' ')) { + if 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+16811, zType+uintptr(i), int32(6)) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-int32(1))))) == int32(' ')) && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32('\000') || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32(' ')) { break } goto _3 @@ -131965,13 +132303,13 @@ func _sqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int FazArg uintptr Fp uintptr })(unsafe.Pointer(pTab + 64))).FazArg)) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22193, libc.VaList(bp+16, zModule)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22265, libc.VaList(bp+16, zModule)) rc = int32(SQLITE_ERROR) } else { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) rc = _vtabCallConstructor(tls, db, pTab, pMod, (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp) if rc != SQLITE_OK { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3862, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3888, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) (*TParse)(unsafe.Pointer(pParse)).Frc = rc } _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) @@ -132052,7 +132390,7 @@ func _sqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, ** error. Otherwise, do nothing. */ if pMod == uintptr(0) || (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22193, libc.VaList(bp+8, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22265, libc.VaList(bp+8, zMod)) rc = int32(SQLITE_ERROR) } else { rc = _vtabCallConstructor(tls, db, pTab, pMod, (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -132100,7 +132438,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) (r i z += uintptr(_sqlite3GetToken(tls, z, bp+424)) } if *(*int32)(unsafe.Pointer(bp + 424)) != libc.Int32FromUint8(_aKeyword1[i]) { - _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+22212, 0) + _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+22284, 0) return int32(SQLITE_ERROR) } goto _1 @@ -132111,9 +132449,9 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) (r i Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) pCtx = (*Tsqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(pCtx != 0) || (*TVtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { - _sqlite3Error(tls, db, _sqlite3MisuseError(tls, int32(157368))) + _sqlite3Error(tls, db, _sqlite3MisuseError(tls, int32(158352))) Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) - return _sqlite3MisuseError(tls, int32(157370)) + return _sqlite3MisuseError(tls, int32(158354)) } pTab = (*TVtabCtx)(unsafe.Pointer(pCtx)).FpTab _sqlite3ParseObjectInit(tls, bp, db) @@ -132155,7 +132493,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) (r i (*TVtabCtx)(unsafe.Pointer(pCtx)).FbDeclared = int32(1) } else { if (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg != 0 { - v3 = __ccgo_ts + 3862 + v3 = __ccgo_ts + 3888 } else { v3 = uintptr(0) } @@ -132611,7 +132949,7 @@ func _sqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) if (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxCreate != uintptr(0) && (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxCreate != (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxConnect { return 0 } - pTab = _sqlite3DbMallocZero(tls, db, uint64(104)) + pTab = _sqlite3DbMallocZero(tls, db, uint64(120)) if pTab == uintptr(0) { return 0 } @@ -132631,7 +132969,7 @@ func _sqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) _addModuleArgument(tls, pParse, pTab, _sqlite3DbStrDup(tls, db, (*TTable)(unsafe.Pointer(pTab)).FzName)) rc = _vtabCallConstructor(tls, db, pTab, pMod, (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp) if rc != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3862, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3888, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) _sqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -132695,7 +133033,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) (r in Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Tsqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = _sqlite3MisuseError(tls, int32(157865)) + rc = _sqlite3MisuseError(tls, int32(158849)) } else { ap = va switch op { @@ -132708,7 +133046,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) (r in case int32(SQLITE_VTAB_USES_ALL_SCHEMAS): (*TVTable)(unsafe.Pointer((*TVtabCtx)(unsafe.Pointer(p)).FpVTable)).FbAllSchemas = uint8(1) default: - rc = _sqlite3MisuseError(tls, int32(157887)) + rc = _sqlite3MisuseError(tls, int32(158871)) break } _ = ap @@ -133393,7 +133731,6 @@ type TWhereInfo1 = struct { FrevMask TBitmask FsWC TWhereClause FsMaskSet TWhereMaskSet - Fa [1]TWhereLevel } type WhereInfo1 = TWhereInfo1 @@ -133429,10 +133766,10 @@ type WhereInfo1 = TWhereInfo1 func _explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) (r uintptr) { i = int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -int32(2) { - return __ccgo_ts + 22225 + return __ccgo_ts + 22297 } if i == -int32(1) { - return __ccgo_ts + 16848 + return __ccgo_ts + 16920 } return (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16))).FzCnName } @@ -133451,10 +133788,10 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, var i int32 _ = i if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+22232, int32(5)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+22304, int32(5)) } if nTerm > int32(1) { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+22238, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+22310, int32(1)) } i = 0 for { @@ -133462,7 +133799,7 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, break } if i != 0 { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+13279, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+13304, int32(1)) } Xsqlite3_str_appendall(tls, pStr, _explainIndexColumnName(tls, pIdx, iTerm+i)) goto _1 @@ -133471,11 +133808,11 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i++ } if nTerm > int32(1) { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+5173, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+5199, int32(1)) } Xsqlite3_str_append(tls, pStr, zOp, int32(1)) if nTerm > int32(1) { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+22238, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+22310, int32(1)) } i = 0 for { @@ -133483,16 +133820,16 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, break } if i != 0 { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+13279, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+13304, int32(1)) } - Xsqlite3_str_append(tls, pStr, __ccgo_ts+5175, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+5201, int32(1)) goto _2 _2: ; i++ } if nTerm > int32(1) { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+5173, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+5199, int32(1)) } } @@ -133539,7 +133876,7 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { if libc.Int32FromUint16(nEq) == 0 && (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_BTM_LIMIT)|libc.Int32FromInt32(WHERE_TOP_LIMIT)) == uint32(0) { return } - Xsqlite3_str_append(tls, pStr, __ccgo_ts+22240, int32(2)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+22312, int32(2)) i = 0 for { if !(i < libc.Int32FromUint16(nEq)) { @@ -133547,12 +133884,12 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { } z = _explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, __ccgo_ts+22232, int32(5)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+22304, int32(5)) } if i >= libc.Int32FromUint16(nSkip) { - v2 = __ccgo_ts + 22243 + v2 = __ccgo_ts + 22315 } else { - v2 = __ccgo_ts + 22248 + v2 = __ccgo_ts + 22320 } Xsqlite3_str_appendf(tls, pStr, v2, libc.VaList(bp+8, z)) goto _1 @@ -133569,7 +133906,7 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { FnDistinctCol Tu16 FpIndex uintptr FpOrderBy uintptr - })(unsafe.Pointer(pLoop + 24))).FnBtm), j, i, __ccgo_ts+22256) + })(unsafe.Pointer(pLoop + 24))).FnBtm), j, i, __ccgo_ts+22328) i = int32(1) } if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_TOP_LIMIT) != 0 { @@ -133580,9 +133917,9 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { FnDistinctCol Tu16 FpIndex uintptr FpOrderBy uintptr - })(unsafe.Pointer(pLoop + 24))).FnTop), j, i, __ccgo_ts+22258) + })(unsafe.Pointer(pLoop + 24))).FnTop), j, i, __ccgo_ts+22330) } - Xsqlite3_str_append(tls, pStr, __ccgo_ts+5173, int32(1)) + Xsqlite3_str_append(tls, pStr, __ccgo_ts+5199, int32(1)) } // C documentation @@ -133627,11 +133964,11 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab _sqlite3StrAccumInit(tls, bp, db, bp+32, int32(100), int32(SQLITE_MAX_LENGTH)) (*(*TStrAccum)(unsafe.Pointer(bp))).FprintfFlags = uint8(SQLITE_PRINTF_INTERNAL) if isSearch != 0 { - v2 = __ccgo_ts + 22260 + v2 = __ccgo_ts + 22332 } else { - v2 = __ccgo_ts + 22267 + v2 = __ccgo_ts + 22339 } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22272, libc.VaList(bp+144, v2, pItem)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22344, libc.VaList(bp+144, v2, pItem)) if flags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_IPK)|libc.Int32FromInt32(WHERE_VIRTUALTABLE)) == uint32(0) { zFmt = uintptr(0) pIdx = (*(*struct { @@ -133644,37 +133981,37 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab })(unsafe.Pointer(pLoop + 24))).FpIndex if !((*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem)).FpSTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) && int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0)) == int32(SQLITE_IDXTYPE_PRIMARYKEY) { if isSearch != 0 { - zFmt = __ccgo_ts + 11442 + zFmt = __ccgo_ts + 11467 } } else { if flags&uint32(WHERE_PARTIALIDX) != 0 { - zFmt = __ccgo_ts + 22278 + zFmt = __ccgo_ts + 22350 } else { if flags&uint32(WHERE_AUTO_INDEX) != 0 { - zFmt = __ccgo_ts + 22311 + zFmt = __ccgo_ts + 22383 } else { if flags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_IDX_ONLY)|libc.Int32FromInt32(WHERE_EXPRIDX)) != 0 { - zFmt = __ccgo_ts + 22336 + zFmt = __ccgo_ts + 22408 } else { - zFmt = __ccgo_ts + 22354 + zFmt = __ccgo_ts + 22426 } } } } if zFmt != 0 { - Xsqlite3_str_append(tls, bp, __ccgo_ts+22363, int32(7)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+22435, int32(7)) Xsqlite3_str_appendf(tls, bp, zFmt, libc.VaList(bp+144, (*TIndex)(unsafe.Pointer(pIdx)).FzName)) _explainIndexRange(tls, bp, pLoop) } } else { if flags&uint32(WHERE_IPK) != uint32(0) && flags&uint32(WHERE_CONSTRAINT) != uint32(0) { - zRowid = __ccgo_ts + 16848 - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22371, libc.VaList(bp+144, zRowid)) + zRowid = __ccgo_ts + 16920 + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22443, libc.VaList(bp+144, zRowid)) if flags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_COLUMN_EQ)|libc.Int32FromInt32(WHERE_COLUMN_IN)) != 0 { cRangeOp = int8('=') } else { if flags&uint32(WHERE_BOTH_LIMIT) == uint32(WHERE_BOTH_LIMIT) { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22402, libc.VaList(bp+144, zRowid)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22474, libc.VaList(bp+144, zRowid)) cRangeOp = int8('<') } else { if flags&uint32(WHERE_BTM_LIMIT) != 0 { @@ -133684,14 +134021,14 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab } } } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22412, libc.VaList(bp+144, int32(cRangeOp))) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22484, libc.VaList(bp+144, int32(cRangeOp))) } else { if flags&uint32(WHERE_VIRTUALTABLE) != uint32(0) { - Xsqlite3_str_appendall(tls, bp, __ccgo_ts+22417) + Xsqlite3_str_appendall(tls, bp, __ccgo_ts+22489) if int32(Tu32(*(*uint8)(unsafe.Pointer(pLoop + 24 + 4))&0x4>>2)) != 0 { - v3 = __ccgo_ts + 22439 + v3 = __ccgo_ts + 22511 } else { - v3 = __ccgo_ts + 22447 + v3 = __ccgo_ts + 22519 } Xsqlite3_str_appendf(tls, bp, v3, libc.VaList(bp+144, (*(*struct { FidxNum int32 @@ -133712,7 +134049,7 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab } } if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_LEFT) != 0 { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22453, 0) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22525, 0) } _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16))) (*TVdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(-libc.Int32FromInt32(6)) @@ -133778,14 +134115,14 @@ func _sqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* Initial space for EQP output string */ _sqlite3StrAccumInit(tls, bp, db, bp+32, int32(100), int32(SQLITE_MAX_LENGTH)) (*(*TStrAccum)(unsafe.Pointer(bp))).FprintfFlags = uint8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22464, libc.VaList(bp+144, pItem)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22536, libc.VaList(bp+144, pItem)) pLoop = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpWLoop if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_IPK) != 0 { pTab = (*TSrcItem)(unsafe.Pointer(pItem)).FpSTab if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22243, libc.VaList(bp+144, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*16))).FzCnName)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22315, libc.VaList(bp+144, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*16))).FzCnName)) } else { - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22485, 0) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22557, 0) } } else { i = libc.Int32FromUint16((*TWhereLoop)(unsafe.Pointer(pLoop)).FnSkip) @@ -133809,16 +134146,16 @@ func _sqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp FpOrderBy uintptr })(unsafe.Pointer(pLoop + 24))).FpIndex, i) if i > libc.Int32FromUint16((*TWhereLoop)(unsafe.Pointer(pLoop)).FnSkip) { - Xsqlite3_str_append(tls, bp, __ccgo_ts+22232, int32(5)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+22304, int32(5)) } - Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22243, libc.VaList(bp+144, z)) + Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22315, libc.VaList(bp+144, z)) goto _1 _1: ; i++ } } - Xsqlite3_str_append(tls, bp, __ccgo_ts+5173, int32(1)) + Xsqlite3_str_append(tls, bp, __ccgo_ts+5199, int32(1)) zMsg = _sqlite3StrAccumFinish(tls, bp) ret = _sqlite3VdbeAddOp4(tls, v, int32(OP_Explain), _sqlite3VdbeCurrentAddr(tls, v), (*TParse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -int32(6)) return ret @@ -134023,7 +134360,7 @@ func _adjustOrderByCol(tls *libc.TLS, pOrderBy uintptr, pEList uintptr) { // /* // ** pX is an expression of the form: (vector) IN (SELECT ...) // ** In other words, it is a vector IN operator with a SELECT clause on the -// ** LHS. But not all terms in the vector are indexable and the terms might +// ** RHS. But not all terms in the vector are indexable and the terms might // ** not be in the correct order for indexing. // ** // ** This routine makes a copy of the input pX expression and then adjusts @@ -134102,7 +134439,7 @@ func _removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, p *(*uintptr)(unsafe.Pointer((*TExpr)(unsafe.Pointer(pNew)).FpLeft + 32)) = pLhs } (*TSelect)(unsafe.Pointer(pSelect)).FpEList = pRhs - v4 = pParse + 148 + v4 = pParse + 132 *(*int32)(unsafe.Pointer(v4))++ v3 = *(*int32)(unsafe.Pointer(v4)) (*TSelect)(unsafe.Pointer(pSelect)).FselId = libc.Uint32FromInt32(v3) /* Req'd for SubrtnSig validity */ @@ -134464,7 +134801,7 @@ func _codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev i */ regBase = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) nReg = libc.Int32FromUint16(nEq) + nExtraReg - *(*int32)(unsafe.Pointer(pParse + 60)) += nReg + *(*int32)(unsafe.Pointer(pParse + 64)) += nReg zAff = _sqlite3DbStrDup(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, _sqlite3IndexAffinityStr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pIdx)) if nSkip != 0 { iIdxCur = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur @@ -134877,7 +135214,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI ** row of the left table of the join. */ if libc.Int32FromUint8((*TWhereLevel)(unsafe.Pointer(pLevel)).FiFrom) > 0 && libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pTabItem))).Ffg.Fjointype)&int32(JT_LEFT) != 0 { - v5 = pParse + 60 + v5 = pParse + 64 *(*int32)(unsafe.Pointer(v5))++ v4 = *(*int32)(unsafe.Pointer(v5)) (*TWhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin = v4 @@ -134938,11 +135275,11 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI FidxStr uintptr FmHandleIn Tu32 })(unsafe.Pointer(pLoop + 24))).FmHandleIn != 0 { - v10 = pParse + 56 + v10 = pParse + 60 v9 = *(*int32)(unsafe.Pointer(v10)) *(*int32)(unsafe.Pointer(v10))++ iTab = v9 - v12 = pParse + 60 + v12 = pParse + 64 *(*int32)(unsafe.Pointer(v12))++ v11 = *(*int32)(unsafe.Pointer(v12)) iCache = v11 @@ -134973,6 +135310,9 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI FmHandleIn Tu32 })(unsafe.Pointer(pLoop + 24))).FidxNum, iReg) _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), nConstraint, iReg+int32(1)) + /* The instruction immediately prior to OP_VFilter must be an OP_Integer + ** that sets the "argc" value for xVFilter. This is necessary for + ** resolveP2() to work correctly. See tag-20250207a. */ if int32(Tu32(*(*uint8)(unsafe.Pointer(pLoop + 24 + 4))&0x1>>0)) != 0 { v13 = -int32(6) } else { @@ -135111,7 +135451,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI ** construct. */ pTerm = *(*uintptr)(unsafe.Pointer((*TWhereLoop)(unsafe.Pointer(pLoop)).FaLTerm)) - v21 = pParse + 60 + v21 = pParse + 64 *(*int32)(unsafe.Pointer(v21))++ v20 = *(*int32)(unsafe.Pointer(v21)) iReleaseReg = v20 @@ -135191,7 +135531,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if pEnd != 0 { pX1 = (*TWhereTerm)(unsafe.Pointer(pEnd)).FpExpr /* Transitive constraints */ - v28 = pParse + 60 + v28 = pParse + 64 *(*int32)(unsafe.Pointer(v28))++ v27 = *(*int32)(unsafe.Pointer(v28)) memEndValue = v27 @@ -135225,7 +135565,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI (*TWhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iCur (*TWhereLevel)(unsafe.Pointer(pLevel)).Fp2 = start if testOp != int32(OP_Noop) { - v33 = pParse + 60 + v33 = pParse + 64 *(*int32)(unsafe.Pointer(v33))++ v32 = *(*int32)(unsafe.Pointer(v33)) iRowidReg = v32 @@ -135347,7 +135687,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_TOP_LIMIT)|libc.Int32FromInt32(WHERE_BTM_LIMIT)) == uint32(0) && (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_BIGNULL_SORT) != uint32(0) { nExtraReg = int32(1) bSeekPastNull = uint8(1) - v40 = pParse + 60 + v40 = pParse + 64 *(*int32)(unsafe.Pointer(v40))++ v39 = *(*int32)(unsafe.Pointer(v40)) v38 = v39 @@ -135540,7 +135880,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if !(j < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) { break } - k = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) + k = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) _sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iIdxCur, k, iRowidReg+j) goto _42 _42: @@ -135554,12 +135894,13 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if (*TWhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0 { /* If a partial index is driving the loop, try to eliminate WHERE clause ** terms from the query that must be true due to the WHERE clause of - ** the partial index. + ** the partial index. This optimization does not work on an outer join, + ** as shown by: ** - ** 2019-11-02 ticket 623eff57e76d45f6: This optimization does not work - ** for a LEFT JOIN. + ** 2019-11-02 ticket 623eff57e76d45f6 (LEFT JOIN) + ** 2025-05-29 forum post 7dee41d32506c4ae (RIGHT JOIN) */ - if (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { + if (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 && (*TWhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0) { _whereApplyPartialIndexConstraints(tls, (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC) } } else { @@ -135597,11 +135938,11 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI } else { if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_MULTI_OR) != 0 { /* Shortened table list or OR-clause generation */ pCov = uintptr(0) - v45 = pParse + 56 + v45 = pParse + 60 v44 = *(*int32)(unsafe.Pointer(v45)) *(*int32)(unsafe.Pointer(v45))++ /* Potential covering index (or NULL) */ iCovCur = v44 - v47 = pParse + 60 + v47 = pParse + 64 *(*int32)(unsafe.Pointer(v47))++ v46 = *(*int32)(unsafe.Pointer(v47)) /* Cursor used for index scans (if any) */ regReturn = v46 /* Register used with OP_Gosub */ @@ -135621,7 +135962,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI */ if libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > int32(1) { /* Original list of tables */ nNotReady = libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - int32(1) - pOrTab = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(88)+libc.Uint64FromInt32(nNotReady)*uint64(80))) + pOrTab = _sqlite3DbMallocRawNN(tls, db, uint64(uint64(libc.UintptrFromInt32(0)+8)+libc.Uint64FromInt32(nNotReady+libc.Int32FromInt32(1))*libc.Uint64FromInt64(80))) if pOrTab == uintptr(0) { return notReady } @@ -135657,21 +135998,21 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI */ if libc.Int32FromUint16((*TWhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&int32(WHERE_DUPLICATES_OK) == 0 { if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) { - v50 = pParse + 60 + v50 = pParse + 64 *(*int32)(unsafe.Pointer(v50))++ v49 = *(*int32)(unsafe.Pointer(v50)) regRowset = v49 _sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, regRowset) } else { pPk1 = _sqlite3PrimaryKeyIndex(tls, pTab) - v52 = pParse + 56 + v52 = pParse + 60 v51 = *(*int32)(unsafe.Pointer(v52)) *(*int32)(unsafe.Pointer(v52))++ regRowset = v51 _sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), regRowset, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk1)).FnKeyCol)) _sqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1) } - v54 = pParse + 60 + v54 = pParse + 64 *(*int32)(unsafe.Pointer(v54))++ v53 = *(*int32)(unsafe.Pointer(v54)) regRowid = v53 @@ -135689,7 +136030,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI ** ** This optimization also only applies if the (x1 OR x2 OR ...) term ** is not contained in the ON clause of a LEFT JOIN. - ** See ticket http://www.sqlite.org/src/info/f2369304e4 + ** See ticket http://sqlite.org/src/info/f2369304e4 ** ** 2022-02-04: Do not push down slices of a row-value comparison. ** In other words, "w" or "y" may not be a slice of a vector. Otherwise, @@ -135744,7 +136085,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI ** eliminating duplicates from other WHERE clauses, the action for each ** sub-WHERE clause is to to invoke the main loop body as a subroutine. */ - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22493, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22565, 0) ii = 0 for { if !(ii < (*TWhereClause)(unsafe.Pointer(pOrWc)).FnTerm) { @@ -135767,7 +136108,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } /* Loop through table entries that match term pOrTerm. */ - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22508, libc.VaList(bp+96, ii+int32(1))) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22580, libc.VaList(bp+96, ii+int32(1))) pSubWInfo = _sqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) if pSubWInfo != 0 { addrExplain = _sqlite3WhereExplainOneScan(tls, pParse, pOrTab, pSubWInfo+856, uint16(0)) @@ -136256,9 +136597,9 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe defer tls.Free(112) var addrCont, iCol, iCur, iIdxCur, iPk, jmp, k, nPk, r, v3 int32 var mAll TBitmask - var pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, v, v4 uintptr - var _ /* sFrom at bp+0 */ TSrcList - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addrCont, iCol, iCur, iIdxCur, iPk, jmp, k, mAll, nPk, pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, r, v, v3, v4 + var pFrom, pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, v, v4 uintptr + var _ /* fromSpace at bp+0 */ [88]Tu8 + _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addrCont, iCol, iCur, iIdxCur, iPk, jmp, k, mAll, nPk, pFrom, pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, r, v, v3, v4 pParse = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe pRJ = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpRJ @@ -136267,7 +136608,7 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe pLoop = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpWLoop pTabItem = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*TWhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*80 mAll = uint64(0) - _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22517, libc.VaList(bp+96, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pTabItem)).FpSTab)).FzName)) + _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22589, libc.VaList(bp+96, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pTabItem)).FpSTab)).FzName)) k = 0 for { if !(k < iLevel) { @@ -136313,15 +136654,16 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe k++ } } - (*(*TSrcList)(unsafe.Pointer(bp))).FnSrc = int32(1) - (*(*TSrcList)(unsafe.Pointer(bp))).FnAlloc = uint32(1) - libc.Xmemcpy(tls, bp+8, pTabItem, uint64(80)) - (*(*TSrcItem)(unsafe.Pointer(bp + 8))).Ffg.Fjointype = uint8(0) + pFrom = bp + (*TSrcList)(unsafe.Pointer(pFrom)).FnSrc = int32(1) + (*TSrcList)(unsafe.Pointer(pFrom)).FnAlloc = uint32(1) + libc.Xmemcpy(tls, pFrom+8, pTabItem, uint64(80)) + (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).Ffg.Fjointype = uint8(0) (*TParse)(unsafe.Pointer(pParse)).FwithinRJSubrtn++ - pSubWInfo = _sqlite3WhereBegin(tls, pParse, bp, pSubWhere, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_RIGHT_JOIN), 0) + pSubWInfo = _sqlite3WhereBegin(tls, pParse, pFrom, pSubWhere, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_RIGHT_JOIN), 0) if pSubWInfo != 0 { iCur = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiTabCur - v4 = pParse + 60 + v4 = pParse + 64 *(*int32)(unsafe.Pointer(v4))++ v3 = *(*int32)(unsafe.Pointer(v4)) r = v3 @@ -136333,7 +136675,7 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe } else { pPk = _sqlite3PrimaryKeyIndex(tls, pTab) nPk = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) - *(*int32)(unsafe.Pointer(pParse + 60)) += nPk - int32(1) + *(*int32)(unsafe.Pointer(pParse + 64)) += nPk - int32(1) iPk = 0 for { if !(iPk < nPk) { @@ -136804,19 +137146,19 @@ var _aOp = [4]struct { FeOp2 uint8 }{ 0: { - FzOp: __ccgo_ts + 16697, + FzOp: __ccgo_ts + 16769, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH), }, 1: { - FzOp: __ccgo_ts + 16031, + FzOp: __ccgo_ts + 16103, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB), }, 2: { - FzOp: __ccgo_ts + 15510, + FzOp: __ccgo_ts + 15562, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE), }, 3: { - FzOp: __ccgo_ts + 22531, + FzOp: __ccgo_ts + 22603, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP), }, } @@ -137604,7 +137946,7 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { extraRight = x - uint64(1) /* ON clause terms may not be used with an index ** on left table of a LEFT JOIN. Ticket #3015 */ if prereqAll>>libc.Int32FromInt32(1) >= x { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22538, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22610, 0) return } } else { @@ -137616,10 +137958,10 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { ** if there is a RIGHT or FULL JOIN in the query. This makes SQLite ** more like other systems, and also preserves legacy. */ if (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).Ffg.Fjointype)&int32(JT_LTORJ) != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22538, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22610, 0) return } - *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_InnerON)) + *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_InnerON)) } } } @@ -137700,7 +138042,7 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { } else { if op == int32(TK_ISNULL) && !((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != libc.Uint32FromInt32(0)) && 0 == _sqlite3ExprCanBeNull(tls, pLeft) { (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_TRUEFALSE) /* See tag-20230504-1 */ - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 8080 + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 8105 *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_IsFalse)) (*TWhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*TWhereTerm)(unsafe.Pointer(pTerm)).FeOperator = uint16(0) @@ -137801,7 +138143,7 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { *(*Tu8)(unsafe.Pointer(pC))++ } if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { - v13 = __ccgo_ts + 22579 + v13 = __ccgo_ts + 22651 } else { v13 = uintptr(unsafe.Pointer(&_sqlite3StrBINARY)) } @@ -138332,7 +138674,7 @@ func _sqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22586, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, j)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22658, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, j)) return } pColRef = _sqlite3ExprAlloc(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_COLUMN), uintptr(0), 0) @@ -138404,7 +138746,6 @@ type THiddenIndexInfo = struct { FeDistinct int32 FmIn Tu32 FmHandleIn Tu32 - FaRhs [1]uintptr } type HiddenIndexInfo = THiddenIndexInfo @@ -138415,7 +138756,6 @@ type THiddenIndexInfo1 = struct { FeDistinct int32 FmIn Tu32 FmHandleIn Tu32 - FaRhs [1]uintptr } type HiddenIndexInfo1 = THiddenIndexInfo1 @@ -139448,7 +139788,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea } cMask = v2 if !(sentWarning != 0) { - Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_WARNING)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+22622, libc.VaList(bp+16, (*TTable)(unsafe.Pointer(pTable)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTable)).FaCol + uintptr(iCol)*16))).FzCnName)) + Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_WARNING)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+22694, libc.VaList(bp+16, (*TTable)(unsafe.Pointer(pTable)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTable)).FaCol + uintptr(iCol)*16))).FzCnName)) sentWarning = uint8(1) } if idxCols&cMask == uint64(0) { @@ -139538,7 +139878,8 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea nKeyCol += int32((*TTable)(unsafe.Pointer(pTable)).FnCol) - libc.Int32FromUint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(8)) + int32(1) } /* Construct the Index object to describe this index */ - pIdx = _sqlite3AllocateIndexObject(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int16(nKeyCol+libc.BoolInt32((*TTable)(unsafe.Pointer(pTable)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0))), 0, bp) + /* ^-- This guarantees that the number of index columns will fit in the u16 */ + pIdx = _sqlite3AllocateIndexObject(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, nKeyCol+libc.BoolInt32((*TTable)(unsafe.Pointer(pTable)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0)), 0, bp) if pIdx == uintptr(0) { goto end_auto_index_create } @@ -139550,7 +139891,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea FpIndex uintptr FpOrderBy uintptr })(unsafe.Pointer(pLoop + 24))).FpIndex = pIdx - (*TIndex)(unsafe.Pointer(pIdx)).FzName = __ccgo_ts + 22648 + (*TIndex)(unsafe.Pointer(pIdx)).FzName = __ccgo_ts + 22720 (*TIndex)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -139638,7 +139979,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(n)*8)) = uintptr(unsafe.Pointer(&_sqlite3StrBINARY)) } /* Create the automatic index */ - v14 = pParse + 56 + v14 = pParse + 60 v13 = *(*int32)(unsafe.Pointer(v14)) *(*int32)(unsafe.Pointer(v14))++ (*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = v13 @@ -139646,7 +139987,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea _sqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) if (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_BloomFilter)) == uint32(0) && useBloomFilter != 0 { _sqlite3WhereExplainBloomFilter(tls, pParse, (*TWhereClause)(unsafe.Pointer(pWC)).FpWInfo, pLevel) - v16 = pParse + 60 + v16 = pParse + 64 *(*int32)(unsafe.Pointer(v16))++ v15 = *(*int32)(unsafe.Pointer(v16)) (*TWhereLevel)(unsafe.Pointer(pLevel)).FregFilter = v15 @@ -139742,7 +140083,7 @@ func _sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, p _sqlite3WhereExplainBloomFilter(tls, pParse, pWInfo, pLevel) addrCont = _sqlite3VdbeMakeLabel(tls, pParse) iCur = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiTabCur - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) (*TWhereLevel)(unsafe.Pointer(pLevel)).FregFilter = v1 @@ -140016,7 +140357,7 @@ func _allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable TB } /* Allocate the sqlite3_index_info structure */ - pIdxInfo = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(96)+(libc.Uint64FromInt64(12)+libc.Uint64FromInt64(8))*libc.Uint64FromInt32(nTerm)+uint64(8)*libc.Uint64FromInt32(nOrderBy)+uint64(40)+uint64(8)*libc.Uint64FromInt32(nTerm))) + pIdxInfo = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint64(96)+(libc.Uint64FromInt64(12)+libc.Uint64FromInt64(8))*libc.Uint64FromInt32(nTerm)+uint64(8)*libc.Uint64FromInt32(nOrderBy)+(uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(nTerm)*uint64(8)))) if pIdxInfo == uintptr(0) { _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+1635, 0) return uintptr(0) @@ -140224,9 +140565,9 @@ func _vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) (r i _sqlite3OomFault(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb) } else { if !((*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3862, libc.VaList(bp+8, _sqlite3ErrStr(tls, rc))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3888, libc.VaList(bp+8, _sqlite3ErrStr(tls, rc))) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3862, libc.VaList(bp+8, (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3888, libc.VaList(bp+8, (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } } @@ -141699,13 +142040,8 @@ func _whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pPro } else { opMask = libc.Int32FromInt32(WO_EQ) | libc.Int32FromInt32(WO_IN) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_ISNULL) | libc.Int32FromInt32(WO_IS) } - if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x4>>2)) != 0 || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x100>>8)) != 0 { - if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x4>>2)) != 0 { - opMask &= ^(libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LE)-libc.Int32FromInt32(TK_EQ))) - } - if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x100>>8)) != 0 && int32(*(*uint32)(unsafe.Pointer(pSrc + 24 + 4))&0x2>>1) == 0 { - opMask &= ^(libc.Int32FromInt32(WO_EQ) | libc.Int32FromInt32(WO_IN) | libc.Int32FromInt32(WO_IS)) - } + if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x4>>2)) != 0 { + opMask &= ^(libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LE)-libc.Int32FromInt32(TK_EQ))) } saved_nEq = (*(*struct { FnEq Tu16 @@ -142065,7 +142401,7 @@ func _whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pPro FnDistinctCol Tu16 FpIndex uintptr FpOrderBy uintptr - })(unsafe.Pointer(pNew + 24))).FnEq) < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pProbe)).FnKeyCol) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x3>>0)) != int32(SQLITE_IDXTYPE_PRIMARYKEY) && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x800>>11)) != 0)) { + })(unsafe.Pointer(pNew + 24))).FnEq) < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pProbe)).FnKeyCol) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x3>>0)) != int32(SQLITE_IDXTYPE_PRIMARYKEY) && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x400>>10)) != 0)) { if libc.Int32FromUint16((*(*struct { FnEq Tu16 FnBtm Tu16 @@ -142269,7 +142605,7 @@ func _whereUsablePartialIndex(tls *libc.TLS, iTab int32, jointype Tu8, pWC uintp break } pExpr = (*TWhereTerm)(unsafe.Pointer(pTerm)).FpExpr - if (!((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != libc.Uint32FromInt32(0)) || *(*int32)(unsafe.Pointer(pExpr + 52)) == iTab) && (libc.Int32FromUint8(jointype)&int32(JT_OUTER) == 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != uint32(0)) && _sqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, iTab) != 0 && libc.Int32FromUint16((*TWhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&int32(TERM_VNULL) == 0 { + if (!((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != libc.Uint32FromInt32(0)) || *(*int32)(unsafe.Pointer(pExpr + 52)) == iTab) && (libc.Int32FromUint8(jointype)&int32(JT_OUTER) == 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != uint32(0)) && _sqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, iTab) != 0 && !(_sqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, -int32(1)) != 0) && libc.Int32FromUint16((*TWhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&int32(TERM_VNULL) == 0 { return int32(1) } goto _1 @@ -142379,7 +142715,7 @@ func _whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintp (*TCoveringIndexCheck)(unsafe.Pointer(pCk)).FbUnidx = uint8(1) return int32(WRC_Abort) } else { - if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x2000>>13)) != 0 && _exprIsCoveredByIndex(tls, pExpr, pIdx, (*TCoveringIndexCheck1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur) != 0 { + if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x1000>>12)) != 0 && _exprIsCoveredByIndex(tls, pExpr, pIdx, (*TCoveringIndexCheck1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 40)))).FiTabCur) != 0 { (*TCoveringIndexCheck)(unsafe.Pointer(pCk)).FbExpr = uint8(1) return int32(WRC_Prune) } @@ -142424,7 +142760,7 @@ func _whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur ** if pIdx is covering. Assume it is not. */ return uint32(0) } - if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x2000>>13)) == 0 { + if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x1000>>12)) == 0 { i = 0 for { if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)) { @@ -142553,7 +142889,7 @@ func _wherePartIdxExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, pPart uintpt (*TIndexedExpr)(unsafe.Pointer(p)).Faff = aff (*TParse)(unsafe.Pointer(pParse)).FpIdxPartExpr = p if (*TIndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { - pArg = pParse + 104 + pArg = pParse + 112 _sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_whereIndexedExprCleanup), pArg) } } @@ -142731,7 +143067,7 @@ func _whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask) (r in /* See ticket [98d973b8f5] */ goto _4 /* Partial index inappropriate for this query */ } - if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x200>>9)) != 0 { + if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x100>>8)) != 0 { goto _4 } rSize = *(*TLogEst)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pProbe)).FaiRowLogEst)) @@ -142835,7 +143171,7 @@ func _whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask) (r in _wherePartIdxExpr(tls, (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse, pProbe, (*TIndex)(unsafe.Pointer(pProbe)).FpPartIdxWhere, bp+168, 0, uintptr(0)) } (*TWhereLoop)(unsafe.Pointer(pNew)).FwsFlags = uint32(WHERE_INDEXED) - if *(*TBitmask)(unsafe.Pointer(bp + 168)) == libc.Uint64FromInt32(1)<<(libc.Int32FromUint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(8))-libc.Int32FromInt32(1)) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x2000>>13)) != 0 && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x1000>>12)) != 0) && *(*TBitmask)(unsafe.Pointer(bp + 168)) != uint64(0) { + if *(*TBitmask)(unsafe.Pointer(bp + 168)) == libc.Uint64FromInt32(1)<<(libc.Int32FromUint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(8))-libc.Int32FromInt32(1)) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x1000>>12)) != 0 && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 100))&0x800>>11)) != 0) && *(*TBitmask)(unsafe.Pointer(bp + 168)) != uint64(0) { isCov = _whereIsCoveringIndex(tls, pWInfo, pProbe, (*TSrcItem)(unsafe.Pointer(pSrc)).FiCursor) if isCov == uint32(0) { } else { @@ -143072,7 +143408,7 @@ func _whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask, pTerm1 = v4 } if v5 || v4 == uintptr(0) || *(*uintptr)(unsafe.Pointer((*TWhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0) || libc.Int32FromUint8((*Tsqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22659, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22731, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName)) _freeIdxStr(tls, pIdxInfo) return int32(SQLITE_ERROR) } @@ -143147,7 +143483,7 @@ func _whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask, if *(*uintptr)(unsafe.Pointer((*TWhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { /* The non-zero argvIdx values must be contiguous. Raise an ** error if they are not */ - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22659, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22731, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName)) _freeIdxStr(tls, pIdxInfo) return int32(SQLITE_ERROR) } @@ -143301,7 +143637,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal pVal = uintptr(0) rc = SQLITE_OK if iCons < 0 || iCons >= (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { - rc = _sqlite3MisuseError(tls, int32(167894)) /* EV: R-30545-25046 */ + rc = _sqlite3MisuseError(tls, int32(168893)) /* EV: R-30545-25046 */ } else { if *(*uintptr)(unsafe.Pointer(pH + 32 + uintptr(iCons)*8)) == uintptr(0) { pTerm = _termFromWhereClause(tls, (*THiddenIndexInfo)(unsafe.Pointer(pH)).FpWC, (*(*Tsqlite3_index_constraint)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(iCons)*12))).FiTermOffset) @@ -143737,7 +144073,7 @@ func _whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) (r int32) { if rc != 0 || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == int32(SQLITE_DONE) { /* We hit the query planner search limit set by iPlanLimit */ - Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+22685, 0) + Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+22757, 0) rc = SQLITE_OK } else { break @@ -144945,7 +145281,7 @@ func _wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst TLogEst) (r int32) iLoop++ } if nFrom == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22720, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22792, 0) _sqlite3DbFreeNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pSpace) return int32(SQLITE_ERROR) } @@ -145523,7 +145859,7 @@ func _whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur i } (*TParse)(unsafe.Pointer(pParse)).FpIdxEpr = p if (*TIndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) { - pArg = pParse + 96 + pArg = pParse + 104 _sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_whereIndexedExprCleanup), pArg) } goto _1 @@ -145679,7 +146015,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere ** bits in a Bitmask */ if (*TSrcList)(unsafe.Pointer(pTabList)).FnSrc > libc.Int32FromUint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(8)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22738, libc.VaList(bp+64, libc.Int32FromUint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(8)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22810, libc.VaList(bp+64, libc.Int32FromUint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(8)))) return uintptr(0) } /* This function normally generates a nested loop for all tables in @@ -145700,10 +146036,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere ** field (type Bitmask) it must be aligned on an 8-byte boundary on ** some architectures. Hence the ROUND8() below. */ - nByteWInfo = libc.Int32FromUint64(libc.Uint64FromInt64(960)) - if nTabList > int32(1) { - nByteWInfo = libc.Int32FromUint64(libc.Uint64FromInt32(nByteWInfo) + libc.Uint64FromInt32(nTabList-libc.Int32FromInt32(1))*libc.Uint64FromInt64(104)) - } + nByteWInfo = libc.Int32FromUint64((uint64(libc.UintptrFromInt32(0)+856) + libc.Uint64FromInt32(nTabList)*libc.Uint64FromInt64(104) + libc.Uint64FromInt32(7)) & libc.Uint64FromInt32(^libc.Int32FromInt32(7))) pWInfo = _sqlite3DbMallocRawNN(tls, db, uint64(libc.Uint64FromInt32(nByteWInfo)+uint64(104))) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { _sqlite3DbFree(tls, db, pWInfo) @@ -145752,7 +146085,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere (*TWhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = uint8(WHERE_DISTINCT_UNIQUE) } if (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpSelect != 0 && (*TSelect)(unsafe.Pointer((*TWhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FselFlags&uint32(SF_MultiValue) == uint32(0) { - _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+22766, 0) + _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+22838, 0) } } else { /* Assign a bit from the bitmask to every term in the FROM clause. @@ -145897,7 +146230,8 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere } } /* TUNING: Assume that a DISTINCT clause on a subquery reduces - ** the output size by a factor of 8 (LogEst -30). + ** the output size by a factor of 8 (LogEst -30). Search for + ** tag-20250414a to see other cases. */ if libc.Int32FromUint16((*TWhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&int32(WHERE_WANT_DISTINCT) != 0 { p11 = pWInfo + 70 @@ -145931,7 +146265,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere if libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= int32(2) && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_BloomFilter)) == uint32(0) { _whereCheckIfBloomFilterIsUseful(tls, pWInfo) } - p12 = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 224 + p12 = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 28 *(*TLogEst)(unsafe.Pointer(p12)) = TLogEst(int32(*(*TLogEst)(unsafe.Pointer(p12))) + int32((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut)) /* If the caller is an UPDATE or DELETE statement that is requesting ** to use a one-pass algorithm, determine if this is appropriate. @@ -146057,11 +146391,11 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere iIndexCur = iAuxArg op1 = int32(OP_ReopenIdx) } else { - v17 = pParse + 56 + v17 = pParse + 60 v16 = *(*int32)(unsafe.Pointer(v17)) *(*int32)(unsafe.Pointer(v17))++ iIndexCur = v16 - if int32(uint32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x2000>>13)) != 0 && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_IndexedExpr)) == uint32(0) { + if int32(uint32(*(*uint16)(unsafe.Pointer(pIx + 100))&0x1000>>12)) != 0 && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_IndexedExpr)) == uint32(0) { _whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem) } if (*TIndex)(unsafe.Pointer(pIx)).FpPartIdxWhere != 0 && libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&int32(JT_RIGHT) == 0 { @@ -146088,16 +146422,16 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere } if v19 && v18 != uintptr(0) { pRJ = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpRJ - v21 = pParse + 56 + v21 = pParse + 60 v20 = *(*int32)(unsafe.Pointer(v21)) *(*int32)(unsafe.Pointer(v21))++ (*TWhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = v20 - v23 = pParse + 60 + v23 = pParse + 64 *(*int32)(unsafe.Pointer(v23))++ v22 = *(*int32)(unsafe.Pointer(v23)) (*TWhereRightJoin)(unsafe.Pointer(pRJ)).FregBloom = v22 _sqlite3VdbeAddOp2(tls, v, int32(OP_Blob), int32(65536), (*TWhereRightJoin)(unsafe.Pointer(pRJ)).FregBloom) - v25 = pParse + 60 + v25 = pParse + 64 *(*int32)(unsafe.Pointer(v25))++ v24 = *(*int32)(unsafe.Pointer(v25)) (*TWhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn = v24 @@ -146276,7 +146610,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { ; j++ } - *(*int32)(unsafe.Pointer(pParse + 60)) += n + int32(1) + *(*int32)(unsafe.Pointer(pParse + 64)) += n + int32(1) if libc.Int32FromUint8((*TWhereLevel)(unsafe.Pointer(pLevel)).Fop) == int32(OP_Prev) { v7 = int32(OP_SeekLT) } else { @@ -146454,7 +146788,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { } else { last = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere } - if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x2000>>13)) != 0 { + if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x1000>>12)) != 0 { p = (*TParse)(unsafe.Pointer(pParse)).FpIdxEpr for p != 0 { if (*TIndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur { @@ -146483,7 +146817,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { x = int32(_sqlite3StorageColumnToTable(tls, pTab, int16(x))) } } - x = int32(_sqlite3TableColumnToIndex(tls, pIdx1, int16(x))) + x = _sqlite3TableColumnToIndex(tls, pIdx1, x) if x >= 0 { (*TVdbeOp)(unsafe.Pointer(pOp)).Fp2 = x (*TVdbeOp)(unsafe.Pointer(pOp)).Fp1 = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur @@ -146493,7 +146827,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* An error. pLoop is supposed to be a covering index loop, ** and yet the VM code refers to a column of the table that ** is not part of the index. */ - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22784, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22856, 0) (*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_INTERNAL) } else { /* The WHERE_EXPRIDX flag is set by the planner when it is likely @@ -146543,7 +146877,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { */ (*TParse)(unsafe.Pointer(pParse)).FnQueryLoop = int16((*TWhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop) _whereInfoFree(tls, db, pWInfo) - p12 = pParse + 38 + p12 = pParse + 37 *(*Tu8)(unsafe.Pointer(p12)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p12))) - nRJ) return } @@ -146812,7 +147146,7 @@ func _nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) goto error_out error_out: ; - Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22813, -int32(1)) + Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22885, -int32(1)) } func _nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { @@ -146994,7 +147328,7 @@ func _ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { if (*TNtileCtx)(unsafe.Pointer(p)).FnTotal == 0 { (*TNtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*TNtileCtx)(unsafe.Pointer(p)).FnParam <= 0 { - Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22869, -int32(1)) + Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22941, -int32(1)) } } (*TNtileCtx)(unsafe.Pointer(p)).FnTotal++ @@ -147320,7 +147654,7 @@ func _windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) (r p = (*TWindow)(unsafe.Pointer(p)).FpNextWin } if p == uintptr(0) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22914, libc.VaList(bp+8, zName)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22986, libc.VaList(bp+8, zName)) } return p } @@ -147371,12 +147705,12 @@ func _sqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin _sqlite3WindowChain(tls, pParse, pWin, pList) } if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeFrmType) == int32(TK_RANGE) && ((*TWindow)(unsafe.Pointer(pWin)).FpStart != 0 || (*TWindow)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*TWindow)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*TExprList)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != int32(1)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22933, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23005, 0) } else { if (*TFuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&uint32(SQLITE_FUNC_WINDOW) != 0 { db = (*TParse)(unsafe.Pointer(pParse)).Fdb if (*TWindow)(unsafe.Pointer(pWin)).FpFilter != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23004, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23076, 0) } else { aUp = [8]struct { FzFunc uintptr @@ -147449,7 +147783,7 @@ func _sqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin (*TWindow)(unsafe.Pointer(pWin)).FeEnd = libc.Uint8FromInt32(aUp[i].FeEnd) (*TWindow)(unsafe.Pointer(pWin)).FeExclude = uint8(0) if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeStart) == int32(TK_FOLLOWING) { - (*TWindow)(unsafe.Pointer(pWin)).FpStart = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8319) + (*TWindow)(unsafe.Pointer(pWin)).FpStart = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8344) } break } @@ -147587,7 +147921,7 @@ func _selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) ( f = libc.Int32FromUint32((*TExpr)(unsafe.Pointer(pExpr)).Fflags & uint32(EP_Collate)) *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_Static)) _sqlite3ExprDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr) - *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Static)) + *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Static)) libc.Xmemset(tls, pExpr, 0, uint64(72)) (*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_COLUMN) if iCol < 0 { @@ -147731,7 +148065,7 @@ func _disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintpt bp := tls.Alloc(16) defer tls.Free(16) if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_AGG_FUNCTION) && (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { - _sqlite3ErrorMsg(tls, (*TWalker)(unsafe.Pointer(pWalker)).FpParse, __ccgo_ts+23067, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + _sqlite3ErrorMsg(tls, (*TWalker)(unsafe.Pointer(pWalker)).FpParse, __ccgo_ts+23139, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -147767,7 +148101,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* Expression list for sub-query */ pMWin = (*TSelect)(unsafe.Pointer(p)).FpWin selFlags = (*TSelect)(unsafe.Pointer(p)).FselFlags - pTab = _sqlite3DbMallocZero(tls, db, uint64(104)) + pTab = _sqlite3DbMallocZero(tls, db, uint64(120)) if pTab == uintptr(0) { return _sqlite3ErrorToParser(tls, db, int32(SQLITE_NOMEM)) } @@ -147782,7 +148116,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { (*TSelect)(unsafe.Pointer(p)).FpWhere = uintptr(0) (*TSelect)(unsafe.Pointer(p)).FpGroupBy = uintptr(0) (*TSelect)(unsafe.Pointer(p)).FpHaving = uintptr(0) - *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Aggregate)) + *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Aggregate) *(*Tu32)(unsafe.Pointer(p + 4)) |= uint32(SF_WinRewrite) /* Create the ORDER BY clause for the sub-select. This is the concatenation ** of the window PARTITION and ORDER BY clauses. Then, if this makes it @@ -147801,11 +148135,11 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { /* Assign a cursor number for the ephemeral table used to buffer rows. ** The OpenEphemeral instruction is coded later, after it is known how ** many columns the table will have. */ - v2 = pParse + 56 + v2 = pParse + 60 v1 = *(*int32)(unsafe.Pointer(v2)) *(*int32)(unsafe.Pointer(v2))++ (*TWindow)(unsafe.Pointer(pMWin)).FiEphCsr = v1 - *(*int32)(unsafe.Pointer(pParse + 56)) += int32(3) + *(*int32)(unsafe.Pointer(pParse + 60)) += int32(3) _selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*TSelect)(unsafe.Pointer(p)).FpEList, pTab, bp) _selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, pTab, bp) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { @@ -147851,11 +148185,11 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { pFilter = _sqlite3ExprDup(tls, db, (*TWindow)(unsafe.Pointer(pWin)).FpFilter, 0) *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(bp)), pFilter) } - v8 = pParse + 60 + v8 = pParse + 64 *(*int32)(unsafe.Pointer(v8))++ v7 = *(*int32)(unsafe.Pointer(v8)) (*TWindow)(unsafe.Pointer(pWin)).FregAccum = v7 - v10 = pParse + 60 + v10 = pParse + 64 *(*int32)(unsafe.Pointer(v10))++ v9 = *(*int32)(unsafe.Pointer(v10)) (*TWindow)(unsafe.Pointer(pWin)).FregResult = v9 @@ -147872,7 +148206,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { ** keep everything legal in this case. */ if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3ExprListAppend(tls, pParse, uintptr(0), _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1785)) + *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3ExprListAppend(tls, pParse, uintptr(0), _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1811)) } pSub = _sqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(bp)), pSrc, pWhere, pGroupBy, pHaving, pSort, uint32(0), uintptr(0)) (*TSelect)(unsafe.Pointer(p)).FpSrc = _sqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0)) @@ -147894,7 +148228,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) { ** the correct error message regardless. */ rc = int32(SQLITE_NOMEM) } else { - libc.Xmemcpy(tls, pTab, pTab2, uint64(104)) + libc.Xmemcpy(tls, pTab, pTab2, uint64(120)) *(*Tu32)(unsafe.Pointer(pTab + 48)) |= uint32(TF_Ephemeral) (*(*TSrcItem)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpSrc + 8))).FpSTab = pTab pTab = pTab2 @@ -148018,7 +148352,7 @@ func _sqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int3 ** frame boundary. */ if eStart == int32(TK_CURRENT) && eEnd == int32(TK_PRECEDING) || eStart == int32(TK_FOLLOWING) && (eEnd == int32(TK_PRECEDING) || eEnd == int32(TK_CURRENT)) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23093, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23165, 0) goto windowAllocErr } pWin = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(144)) @@ -148086,18 +148420,18 @@ func _sqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint zErr = uintptr(0) /* Check for errors */ if (*TWindow)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = __ccgo_ts + 23125 + zErr = __ccgo_ts + 23197 } else { if (*TWindow)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*TWindow)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = __ccgo_ts + 23142 + zErr = __ccgo_ts + 23214 } else { if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = __ccgo_ts + 23158 + zErr = __ccgo_ts + 23230 } } } if zErr != 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23178, libc.VaList(bp+8, zErr, (*TWindow)(unsafe.Pointer(pWin)).FzBase)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23250, libc.VaList(bp+8, zErr, (*TWindow)(unsafe.Pointer(pWin)).FzBase)) } else { (*TWindow)(unsafe.Pointer(pWin)).FpPartition = _sqlite3ExprListDup(tls, db, (*TWindow)(unsafe.Pointer(pExist)).FpPartition, 0) if (*TWindow)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -148121,7 +148455,7 @@ func _sqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr *(*Tu32)(unsafe.Pointer(p + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc) | libc.Int32FromInt32(EP_FullSize)) (*TWindow)(unsafe.Pointer(pWin)).FpOwner = p if (*TExpr)(unsafe.Pointer(p)).Fflags&uint32(EP_Distinct) != 0 && libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeFrmType) != int32(TK_FILTER) { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23211, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23283, 0) } } else { _sqlite3WindowDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -148227,24 +148561,24 @@ func _sqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { if (*TWindow)(unsafe.Pointer(pMWin)).FpPartition != 0 { nExpr = (*TExprList)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pMWin)).FpPartition)).FnExpr (*TWindow)(unsafe.Pointer(pMWin)).FregPart = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nExpr + *(*int32)(unsafe.Pointer(pParse + 64)) += nExpr _sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, (*TWindow)(unsafe.Pointer(pMWin)).FregPart, (*TWindow)(unsafe.Pointer(pMWin)).FregPart+nExpr-int32(1)) } - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) (*TWindow)(unsafe.Pointer(pMWin)).FregOne = v1 _sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), int32(1), (*TWindow)(unsafe.Pointer(pMWin)).FregOne) if (*TWindow)(unsafe.Pointer(pMWin)).FeExclude != 0 { - v4 = pParse + 60 + v4 = pParse + 64 *(*int32)(unsafe.Pointer(v4))++ v3 = *(*int32)(unsafe.Pointer(v4)) (*TWindow)(unsafe.Pointer(pMWin)).FregStartRowid = v3 - v6 = pParse + 60 + v6 = pParse + 64 *(*int32)(unsafe.Pointer(v6))++ v5 = *(*int32)(unsafe.Pointer(v6)) (*TWindow)(unsafe.Pointer(pMWin)).FregEndRowid = v5 - v8 = pParse + 56 + v8 = pParse + 60 v7 = *(*int32)(unsafe.Pointer(v8)) *(*int32)(unsafe.Pointer(v8))++ (*TWindow)(unsafe.Pointer(pMWin)).FcsrApp = v7 @@ -148262,12 +148596,12 @@ func _sqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { if (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_MINMAX) != 0 && libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeStart) != int32(TK_UNBOUNDED) { pList = *(*uintptr)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pWin)).FpOwner + 32)) pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, pList, 0, 0) - v11 = pParse + 56 + v11 = pParse + 60 v10 = *(*int32)(unsafe.Pointer(v11)) *(*int32)(unsafe.Pointer(v11))++ (*TWindow)(unsafe.Pointer(pWin)).FcsrApp = v10 (*TWindow)(unsafe.Pointer(pWin)).FregApp = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(3) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(3) if pKeyInfo != 0 && int32(*(*int8)(unsafe.Pointer((*TFuncDef)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pWin)).FpWFunc)).FzName + 1))) == int32('i') { *(*Tu8)(unsafe.Pointer((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags)) = uint8(KEYINFO_ORDER_DESC) } @@ -148279,15 +148613,15 @@ func _sqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* Allocate two registers at pWin->regApp. These will be used to ** store the start and end index of the current frame. */ (*TWindow)(unsafe.Pointer(pWin)).FregApp = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - v13 = pParse + 56 + v13 = pParse + 60 v12 = *(*int32)(unsafe.Pointer(v13)) *(*int32)(unsafe.Pointer(v13))++ (*TWindow)(unsafe.Pointer(pWin)).FcsrApp = v12 - *(*int32)(unsafe.Pointer(pParse + 60)) += int32(2) + *(*int32)(unsafe.Pointer(pParse + 64)) += int32(2) _sqlite3VdbeAddOp2(tls, v, int32(OP_OpenDup), (*TWindow)(unsafe.Pointer(pWin)).FcsrApp, (*TWindow)(unsafe.Pointer(pMWin)).FiEphCsr) } else { if (*TFuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&_leadName)) || (*TFuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&_lagName)) { - v15 = pParse + 56 + v15 = pParse + 60 v14 = *(*int32)(unsafe.Pointer(v15)) *(*int32)(unsafe.Pointer(v15))++ (*TWindow)(unsafe.Pointer(pWin)).FcsrApp = v14 @@ -148339,11 +148673,11 @@ func _windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { } var _azErr = [5]uintptr{ - 0: __ccgo_ts + 23258, - 1: __ccgo_ts + 23311, - 2: __ccgo_ts + 22813, - 3: __ccgo_ts + 23362, - 4: __ccgo_ts + 23414, + 0: __ccgo_ts + 23330, + 1: __ccgo_ts + 23383, + 2: __ccgo_ts + 22885, + 3: __ccgo_ts + 23434, + 4: __ccgo_ts + 23486, } var _aOp1 = [5]int32{ @@ -148923,7 +149257,7 @@ func _windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) (r int32) { pWin = (*TWindow)(unsafe.Pointer(pWin)).FpNextWin } regArg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nArg + *(*int32)(unsafe.Pointer(pParse + 64)) += nArg return regArg } @@ -149019,7 +149353,7 @@ func _windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal pOrderBy = (*TWindow)(unsafe.Pointer((*TWindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy /* ORDER BY clause for window */ reg1 = _sqlite3GetTempReg(tls, pParse) /* Reg. for csr1.peerVal+regVal */ reg2 = _sqlite3GetTempReg(tls, pParse) - v2 = pParse + 60 + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) /* Reg. for csr2.peerVal */ regString = v1 /* Reg. for constant value '' */ @@ -149736,12 +150070,12 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin ** same values in record form, and the rowid used to insert said record ** into the ephemeral table. */ regNew = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nInput - v2 = pParse + 60 + *(*int32)(unsafe.Pointer(pParse + 64)) += nInput + v2 = pParse + 64 *(*int32)(unsafe.Pointer(v2))++ v1 = *(*int32)(unsafe.Pointer(v2)) regRecord = v1 - v4 = pParse + 60 + v4 = pParse + 64 *(*int32)(unsafe.Pointer(v4))++ v3 = *(*int32)(unsafe.Pointer(v4)) (*(*TWindowCodeArg)(unsafe.Pointer(bp))).FregRowid = v3 @@ -149749,13 +150083,13 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin ** clause, allocate registers to store the results of evaluating each ** <expr>. */ if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeStart) == int32(TK_PRECEDING) || libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeStart) == int32(TK_FOLLOWING) { - v6 = pParse + 60 + v6 = pParse + 64 *(*int32)(unsafe.Pointer(v6))++ v5 = *(*int32)(unsafe.Pointer(v6)) regStart = v5 } if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeEnd) == int32(TK_PRECEDING) || libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeEnd) == int32(TK_FOLLOWING) { - v8 = pParse + 60 + v8 = pParse + 64 *(*int32)(unsafe.Pointer(v8))++ v7 = *(*int32)(unsafe.Pointer(v8)) regEnd = v7 @@ -149775,13 +150109,13 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin regNewPeer += (*TExprList)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pMWin)).FpPartition)).FnExpr } regPeer = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nPeer + *(*int32)(unsafe.Pointer(pParse + 64)) += nPeer (*(*TWindowCodeArg)(unsafe.Pointer(bp))).Fstart.Freg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nPeer + *(*int32)(unsafe.Pointer(pParse + 64)) += nPeer (*(*TWindowCodeArg)(unsafe.Pointer(bp))).Fcurrent.Freg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nPeer + *(*int32)(unsafe.Pointer(pParse + 64)) += nPeer (*(*TWindowCodeArg)(unsafe.Pointer(bp))).Fend.Freg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1) - *(*int32)(unsafe.Pointer(pParse + 60)) += nPeer + *(*int32)(unsafe.Pointer(pParse + 64)) += nPeer } /* Load the column values for the row returned by the sub-select ** into an array of registers starting at regNew. Assemble them into @@ -149808,7 +150142,7 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin nPart = (*TExprList)(unsafe.Pointer(pPart)).FnExpr regNewPart = regNew + (*TWindow)(unsafe.Pointer(pMWin)).FnBufferCol pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, pPart, 0, 0) - v12 = pParse + 60 + v12 = pParse + 64 *(*int32)(unsafe.Pointer(v12))++ v11 = *(*int32)(unsafe.Pointer(v12)) regFlushPart = v11 @@ -150028,6 +150362,10 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin /* #include "sqliteInt.h" */ /* +** Verify that the pParse->isCreate field is set + */ + +/* ** Disable all error recovery processing in the parser push-down ** automaton. */ @@ -150087,7 +150425,7 @@ type FrameBound = TFrameBound func _parserSyntaxError(tls *libc.TLS, pParse uintptr, p uintptr) { bp := tls.Alloc(16) defer tls.Free(16) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23464, libc.VaList(bp+8, p)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23536, libc.VaList(bp+8, p)) } // C documentation @@ -150101,6 +150439,7 @@ func _disableLookaside(tls *libc.TLS, pParse uintptr) { _ = db db = (*TParse)(unsafe.Pointer(pParse)).Fdb (*TParse)(unsafe.Pointer(pParse)).FdisableLookaside++ + libc.Xmemset(tls, pParse+256, 0, uint64(32)) (*Tsqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Tsqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = uint16(0) } @@ -150134,11 +150473,11 @@ func _parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { cnt++ if (*TSelect)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*TSelect)(unsafe.Pointer(pLoop)).FpLimit != 0 { if (*TSelect)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - v1 = __ccgo_ts + 23488 + v1 = __ccgo_ts + 23560 } else { - v1 = __ccgo_ts + 23497 + v1 = __ccgo_ts + 23569 } - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23503, libc.VaList(bp+8, v1, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(pNext)).Fop)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23575, libc.VaList(bp+8, v1, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(pNext)).Fop)))) break } } @@ -150147,7 +150486,7 @@ func _parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { mxSelect = v2 } if v3 && v2 > 0 && cnt > mxSelect { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23545, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23617, 0) } } } @@ -150253,7 +150592,7 @@ func _parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pId _ = p p = _sqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -int32(1)) && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy) == 0 { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23579, libc.VaList(bp+8, (*TToken)(unsafe.Pointer(pIdToken)).Fn, (*TToken)(unsafe.Pointer(pIdToken)).Fz)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23651, libc.VaList(bp+8, (*TToken)(unsafe.Pointer(pIdToken)).Fn, (*TToken)(unsafe.Pointer(pIdToken)).Fz)) } _sqlite3ExprListSetName(tls, pParse, p, pIdToken, int32(1)) return p @@ -158710,20 +159049,20 @@ _30: goto _346 _31: ; /* table_option ::= WITHOUT nm */ - if *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)) == uint32(5) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 8)), __ccgo_ts+16848, int32(5)) == 0 { + if *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)) == uint32(5) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 8)), __ccgo_ts+16920, int32(5)) == 0 { *(*Tu32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)) = libc.Uint32FromInt32(libc.Int32FromInt32(TF_WithoutRowid) | libc.Int32FromInt32(TF_NoVisibleRowid)) } else { *(*Tu32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)) = uint32(0) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23617, libc.VaList(bp+128, *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23689, libc.VaList(bp+128, *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)))) } goto _346 _32: ; /* table_option ::= nm */ - if *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)) == uint32(6) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 8)), __ccgo_ts+16784, int32(6)) == 0 { + if *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)) == uint32(6) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 8)), __ccgo_ts+16856, int32(6)) == 0 { *(*Tu32)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) = uint32(TF_Strict) } else { *(*Tu32)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) = uint32(0) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23617, libc.VaList(bp+128, *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)))) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23689, libc.VaList(bp+128, *(*uint32)(unsafe.Pointer(yymsp + 8 + 8)), *(*uintptr)(unsafe.Pointer(yymsp + 8)))) } *(*Tu32)(unsafe.Pointer(yymsp + 8)) = *(*Tu32)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) goto _346 @@ -158764,7 +159103,12 @@ _43: ; /* ccons ::= CONSTRAINT nm */ _42: ; - (*TParse)(unsafe.Pointer(pParse)).FconstraintName = *(*TToken)(unsafe.Pointer(yymsp + 8)) + (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FconstraintName = *(*TToken)(unsafe.Pointer(yymsp + 8)) goto _346 _44: ; /* ccons ::= DEFAULT scantok term */ @@ -158909,7 +159253,12 @@ _79: goto _346 _80: ; /* tconscomma ::= COMMA */ - (*TParse)(unsafe.Pointer(pParse)).FconstraintName.Fn = uint32(0) + (*(*struct { + FaddrCrTab int32 + FregRowid int32 + FregRoot int32 + FconstraintName TToken + })(unsafe.Pointer(pParse + 256))).FconstraintName.Fn = uint32(0) goto _346 _81: ; /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ @@ -158999,9 +159348,9 @@ _98: (*TSelect)(unsafe.Pointer(pRhs)).Fop = libc.Uint8FromInt32(*(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8))) (*TSelect)(unsafe.Pointer(pRhs)).FpPrior = pLhs if pLhs != 0 { - *(*Tu32)(unsafe.Pointer(pLhs + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_MultiValue)) + *(*Tu32)(unsafe.Pointer(pLhs + 4)) &= ^libc.Uint32FromInt32(SF_MultiValue) } - *(*Tu32)(unsafe.Pointer(pRhs + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_MultiValue)) + *(*Tu32)(unsafe.Pointer(pRhs + 4)) &= ^libc.Uint32FromInt32(SF_MultiValue) if *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)) != int32(TK_ALL) { (*TParse)(unsafe.Pointer(pParse)).FhasCompound = uint8(1) } @@ -159356,7 +159705,7 @@ _176: _177: ; /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ _sqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(5))*24 + 8)), yymsp+uintptr(-libc.Int32FromInt32(4))*24+8) - _sqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)), __ccgo_ts+23644) + _sqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)), __ccgo_ts+23716) if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)) != 0 { pFromClause = *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*24 + 8)) if (*TSrcList)(unsafe.Pointer(pFromClause)).FnSrc > int32(1) { @@ -159706,9 +160055,9 @@ _237: */ _sqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8))) if *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(3))*24 + 8)) != 0 { - v347 = __ccgo_ts + 8075 + v347 = __ccgo_ts + 8100 } else { - v347 = __ccgo_ts + 8080 + v347 = __ccgo_ts + 8105 } *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)) = _sqlite3Expr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_STRING), v347) if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*24 + 8)) != 0 { @@ -159950,15 +160299,15 @@ _276: _277: ; /* trnm ::= nm DOT nm */ *(*TToken)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*24 + 8)) = *(*TToken)(unsafe.Pointer(yymsp + 8)) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23653, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23725, 0) goto _346 _278: ; /* tridxby ::= INDEXED BY nm */ - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23748, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23820, 0) goto _346 _279: ; /* tridxby ::= NOT INDEXED */ - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23832, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23904, 0) goto _346 _280: ; /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ @@ -160100,7 +160449,7 @@ _312: goto _346 _313: ; /* withnm ::= nm */ - (*TParse)(unsafe.Pointer(pParse)).FbHasWith = uint8(1) + libc.SetBitFieldPtr8Uint32(pParse+44, libc.Uint32FromInt32(1), 1, 0x2) goto _346 _314: ; /* wqlist ::= wqitem */ @@ -160294,7 +160643,7 @@ func _yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, _yyminor if *(*int8)(unsafe.Pointer((*(*TToken)(unsafe.Pointer(bp))).Fz)) != 0 { _parserSyntaxError(tls, pParse, bp) } else { - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23917, 0) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23989, 0) } /************ End %syntax_error code ******************************************/ /* Suppress warning about unused %extra_argument variable */ @@ -163025,14 +163374,16 @@ func _sqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) (r int32) { if *(*int32)(unsafe.Pointer(bp)) == int32(TK_FILTER) { *(*int32)(unsafe.Pointer(bp)) = _analyzeFilterKeyword(tls, zSql+6, lastTokenParsed) } else { - if *(*int32)(unsafe.Pointer(bp)) == int32(TK_COMMENT) && (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00040))<<libc.Int32FromInt32(32)) != uint64(0) { + if *(*int32)(unsafe.Pointer(bp)) == int32(TK_COMMENT) && ((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 || (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00040))<<libc.Int32FromInt32(32)) != uint64(0)) { + /* Ignore SQL comments if either (1) we are reparsing the schema or + ** (2) SQLITE_DBCONFIG_ENABLE_COMMENTS is turned on (the default). */ zSql += uintptr(n) continue } else { if *(*int32)(unsafe.Pointer(bp)) != int32(TK_QNUMBER) { (*(*TToken)(unsafe.Pointer(bp + 2440))).Fz = zSql (*(*TToken)(unsafe.Pointer(bp + 2440))).Fn = libc.Uint32FromInt32(n) - _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23934, libc.VaList(bp+2464, bp+2440)) + _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+24006, libc.VaList(bp+2464, bp+2440)) break } } @@ -163056,10 +163407,10 @@ func _sqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) (r int32) { } if (*TParse)(unsafe.Pointer(pParse)).FzErrMsg != 0 || (*TParse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK && (*TParse)(unsafe.Pointer(pParse)).Frc != int32(SQLITE_DONE) { if (*TParse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { - (*TParse)(unsafe.Pointer(pParse)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+3862, libc.VaList(bp+2464, _sqlite3ErrStr(tls, (*TParse)(unsafe.Pointer(pParse)).Frc))) + (*TParse)(unsafe.Pointer(pParse)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+3888, libc.VaList(bp+2464, _sqlite3ErrStr(tls, (*TParse)(unsafe.Pointer(pParse)).Frc))) } if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FprepFlags)&int32(SQLITE_PREPARE_DONT_LOG) == 0 { - Xsqlite3_log(tls, (*TParse)(unsafe.Pointer(pParse)).Frc, __ccgo_ts+23959, libc.VaList(bp+2464, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg, (*TParse)(unsafe.Pointer(pParse)).FzTail)) + Xsqlite3_log(tls, (*TParse)(unsafe.Pointer(pParse)).Frc, __ccgo_ts+24031, libc.VaList(bp+2464, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg, (*TParse)(unsafe.Pointer(pParse)).FzTail)) } nErr++ } @@ -163252,7 +163603,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) (r int32) { case int32('c'): fallthrough case int32('C'): - if nId == int32(6) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23970, int32(6)) == 0 { + if nId == int32(6) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24042, int32(6)) == 0 { token = uint8(tkCREATE) } else { token = uint8(tkOTHER) @@ -163260,13 +163611,13 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) (r int32) { case int32('t'): fallthrough case int32('T'): - if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+20598, int32(7)) == 0 { + if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+20670, int32(7)) == 0 { token = uint8(tkTRIGGER) } else { - if nId == int32(4) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23977, int32(4)) == 0 { + if nId == int32(4) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24049, int32(4)) == 0 { token = uint8(tkTEMP) } else { - if nId == int32(9) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23982, int32(9)) == 0 { + if nId == int32(9) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24054, int32(9)) == 0 { token = uint8(tkTEMP) } else { token = uint8(tkOTHER) @@ -163276,10 +163627,10 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) (r int32) { case int32('e'): fallthrough case int32('E'): - if nId == int32(3) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23992, int32(3)) == 0 { + if nId == int32(3) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24064, int32(3)) == 0 { token = uint8(tkEND) } else { - if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23996, int32(7)) == 0 { + if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24068, int32(7)) == 0 { token = uint8(tkEXPLAIN) } else { token = uint8(tkOTHER) @@ -163603,6 +163954,8 @@ func Xsqlite3_initialize(tls *libc.TLS) (r int32) { } if rc == SQLITE_OK { _sqlite3PCacheBufferSetup(tls, _sqlite3Config.FpPage, _sqlite3Config.FszPage, _sqlite3Config.FnPage) + } + if rc == SQLITE_OK { libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_sqlite3Config))+340, int32(1)) } _sqlite3Config.FinProgress = 0 @@ -163693,7 +164046,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) (r int32) { */ if libc.AtomicLoadPInt32(uintptr(unsafe.Pointer(&_sqlite3Config))+340) != 0 { if op < 0 || op > int32(63) || libc.Uint64FromInt32(1)<<op&_mAnytimeConfigOption == uint64(0) { - return _sqlite3MisuseError(tls, int32(181983)) + return _sqlite3MisuseError(tls, int32(183007)) } } ap = va @@ -163872,10 +164225,10 @@ var _mAnytimeConfigOption = libc.Uint64FromInt32(0) | libc.Uint64FromInt32(1)<<l // ** If lookaside is already active, return SQLITE_BUSY. // ** // ** The sz parameter is the number of bytes in each lookaside slot. -// ** The cnt parameter is the number of slots. If pStart is NULL the -// ** space for the lookaside memory is obtained from sqlite3_malloc(). -// ** If pStart is not NULL then it is sz*cnt bytes of memory to use for -// ** the lookaside memory. +// ** The cnt parameter is the number of slots. If pBuf is NULL the +// ** space for the lookaside memory is obtained from sqlite3_malloc() +// ** or similar. If pBuf is not NULL then it is sz*cnt bytes of memory +// ** to use for the lookaside memory. // */ func _setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) (r int32) { var i, nBig, nSm, v1, v4 int32 @@ -163893,26 +164246,31 @@ func _setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int3 Xsqlite3_free(tls, (*Tsqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) } /* The size of a lookaside slot after ROUNDDOWN8 needs to be larger - ** than a pointer to be useful. + ** than a pointer and small enough to fit in a u16. */ - sz = sz & ^libc.Int32FromInt32(7) /* IMP: R-33038-09382 */ + sz = sz & ^libc.Int32FromInt32(7) if sz <= libc.Int32FromInt64(8) { sz = 0 } if sz > int32(65528) { sz = int32(65528) } - if cnt < 0 { + /* Count must be at least 1 to be useful, but not so large as to use + ** more than 0x7fff0000 total bytes for lookaside. */ + if cnt < int32(1) { cnt = 0 } + if sz > 0 && cnt > int32(0x7fff0000)/sz { + cnt = int32(0x7fff0000) / sz + } szAlloc = int64(sz) * int64(cnt) - if sz == 0 || cnt == 0 { + if szAlloc == 0 { sz = 0 pStart = uintptr(0) } else { if pBuf == uintptr(0) { _sqlite3BeginBenignMalloc(tls) - pStart = _sqlite3Malloc(tls, libc.Uint64FromInt64(szAlloc)) /* IMP: R-61949-35727 */ + pStart = _sqlite3Malloc(tls, libc.Uint64FromInt64(szAlloc)) _sqlite3EndBenignMalloc(tls) if pStart != 0 { szAlloc = int64(_sqlite3MallocSize(tls, pStart)) @@ -164506,7 +164864,7 @@ func _sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) (r int32) { return SQLITE_OK } if !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return _sqlite3MisuseError(tls, int32(182788)) + return _sqlite3MisuseError(tls, int32(183820)) } Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) if libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).FmTrace)&int32(SQLITE_TRACE_CLOSE) != 0 { @@ -164526,7 +164884,7 @@ func _sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) (r int32) { ** SQLITE_BUSY if the connection can not be closed immediately. */ if !(forceZombie != 0) && _connectionIsBusy(tls, db) != 0 { - _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24004, 0) + _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24076, 0) Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) return int32(SQLITE_BUSY) } @@ -164827,14 +165185,14 @@ func _sqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { func _sqlite3ErrStr(tls *libc.TLS, rc int32) (r uintptr) { var zErr uintptr _ = zErr - zErr = __ccgo_ts + 24547 + zErr = __ccgo_ts + 24619 switch rc { case libc.Int32FromInt32(SQLITE_ABORT) | libc.Int32FromInt32(2)<<libc.Int32FromInt32(8): - zErr = __ccgo_ts + 24561 + zErr = __ccgo_ts + 24633 case int32(SQLITE_ROW): - zErr = __ccgo_ts + 24583 + zErr = __ccgo_ts + 24655 case int32(SQLITE_DONE): - zErr = __ccgo_ts + 24605 + zErr = __ccgo_ts + 24677 default: rc &= int32(0xff) if rc >= 0 && rc < libc.Int32FromUint64(libc.Uint64FromInt64(232)/libc.Uint64FromInt64(8)) && _aMsg[rc] != uintptr(0) { @@ -164846,31 +165204,31 @@ func _sqlite3ErrStr(tls *libc.TLS, rc int32) (r uintptr) { } var _aMsg = [29]uintptr{ - 0: __ccgo_ts + 24072, - 1: __ccgo_ts + 24085, - 3: __ccgo_ts + 24101, - 4: __ccgo_ts + 24126, - 5: __ccgo_ts + 24140, - 6: __ccgo_ts + 24159, + 0: __ccgo_ts + 24144, + 1: __ccgo_ts + 24157, + 3: __ccgo_ts + 24173, + 4: __ccgo_ts + 24198, + 5: __ccgo_ts + 24212, + 6: __ccgo_ts + 24231, 7: __ccgo_ts + 1635, - 8: __ccgo_ts + 24184, - 9: __ccgo_ts + 24221, - 10: __ccgo_ts + 24233, - 11: __ccgo_ts + 24248, - 12: __ccgo_ts + 24281, - 13: __ccgo_ts + 24299, - 14: __ccgo_ts + 24324, - 15: __ccgo_ts + 24353, - 17: __ccgo_ts + 6104, - 18: __ccgo_ts + 5506, - 19: __ccgo_ts + 24370, - 20: __ccgo_ts + 24388, - 21: __ccgo_ts + 24406, - 23: __ccgo_ts + 24440, - 25: __ccgo_ts + 24461, - 26: __ccgo_ts + 24487, - 27: __ccgo_ts + 24510, - 28: __ccgo_ts + 24531, + 8: __ccgo_ts + 24256, + 9: __ccgo_ts + 24293, + 10: __ccgo_ts + 24305, + 11: __ccgo_ts + 24320, + 12: __ccgo_ts + 24353, + 13: __ccgo_ts + 24371, + 14: __ccgo_ts + 24396, + 15: __ccgo_ts + 24425, + 17: __ccgo_ts + 6128, + 18: __ccgo_ts + 5532, + 19: __ccgo_ts + 24442, + 20: __ccgo_ts + 24460, + 21: __ccgo_ts + 24478, + 23: __ccgo_ts + 24512, + 25: __ccgo_ts + 24533, + 26: __ccgo_ts + 24559, + 27: __ccgo_ts + 24582, + 28: __ccgo_ts + 24603, } // C documentation @@ -165020,6 +165378,20 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) (r int32) { // C documentation // // /* +// ** Set the setlk timeout value. +// */ +func Xsqlite3_setlk_timeout(tls *libc.TLS, db uintptr, ms int32, flags int32) (r int32) { + if ms < -int32(1) { + return int32(SQLITE_RANGE) + } + _ = db + _ = flags + return SQLITE_OK +} + +// C documentation +// +// /* // ** Cause any pending operation to stop at its earliest opportunity. // */ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { @@ -165049,7 +165421,7 @@ func _sqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i var p, v1 uintptr _, _, _, _ = extraFlags, p, rc, v1 if zFunctionName == uintptr(0) || xSFunc != uintptr(0) && xFinal != uintptr(0) || libc.BoolInt32(xFinal == uintptr(0)) != libc.BoolInt32(xStep == uintptr(0)) || libc.BoolInt32(xValue == uintptr(0)) != libc.BoolInt32(xInverse == uintptr(0)) || (nArg < -int32(1) || nArg > int32(SQLITE_MAX_FUNCTION_ARG)) || int32(255) < _sqlite3Strlen30(tls, zFunctionName) { - return _sqlite3MisuseError(tls, int32(183439)) + return _sqlite3MisuseError(tls, int32(184509)) } extraFlags = enc & (libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_DIRECTONLY) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_INNOCUOUS) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_SELFORDER1)) enc &= libc.Int32FromInt32(SQLITE_FUNC_ENCMASK) | libc.Int32FromInt32(SQLITE_ANY) @@ -165092,7 +165464,7 @@ func _sqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i p = _sqlite3FindFunction(tls, db, zFunctionName, nArg, libc.Uint8FromInt32(enc), uint8(0)) if p != 0 && (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_ENCMASK) == libc.Uint32FromInt32(enc) && int32((*TFuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { - _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24628, 0) + _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24700, 0) return int32(SQLITE_BUSY) } else { _sqlite3ExpirePreparedStatements(tls, db, 0) @@ -165218,7 +165590,7 @@ func _sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotU zName = Xsqlite3_user_data(tls, context) _ = NotUsed _ = NotUsed2 - zErr = Xsqlite3_mprintf(tls, __ccgo_ts+24691, libc.VaList(bp+8, zName)) + zErr = Xsqlite3_mprintf(tls, __ccgo_ts+24763, libc.VaList(bp+8, zName)) Xsqlite3_result_error(tls, context, zErr, -int32(1)) Xsqlite3_free(tls, zErr) } @@ -165249,7 +165621,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i if rc != 0 { return SQLITE_OK } - zCopy = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, zName)) + zCopy = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, zName)) if zCopy == uintptr(0) { return int32(SQLITE_NOMEM) } @@ -165493,7 +165865,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in if eMode < SQLITE_CHECKPOINT_PASSIVE || eMode > int32(SQLITE_CHECKPOINT_TRUNCATE) { /* EVIDENCE-OF: R-03996-12088 The M parameter must be a valid checkpoint ** mode: */ - return _sqlite3MisuseError(tls, int32(184055)) + return _sqlite3MisuseError(tls, int32(185125)) } Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) if zDb != 0 && *(*int8)(unsafe.Pointer(zDb)) != 0 { @@ -165503,7 +165875,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = int32(SQLITE_ERROR) - _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+24742, libc.VaList(bp+8, zDb)) + _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+24814, libc.VaList(bp+8, zDb)) } else { (*Tsqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = _sqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -165625,7 +165997,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) (r uintptr) { return _sqlite3ErrStr(tls, int32(SQLITE_NOMEM)) } if !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return _sqlite3ErrStr(tls, _sqlite3MisuseError(tls, int32(184191))) + return _sqlite3ErrStr(tls, _sqlite3MisuseError(tls, int32(185261))) } Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -165757,7 +166129,7 @@ var _misuse = [34]Tu16{ // */ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) (r int32) { if db != 0 && !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return _sqlite3MisuseError(tls, int32(184270)) + return _sqlite3MisuseError(tls, int32(185340)) } if !(db != 0) || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return int32(SQLITE_NOMEM) @@ -165767,7 +166139,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) (r int32) { func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) (r int32) { if db != 0 && !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return _sqlite3MisuseError(tls, int32(184279)) + return _sqlite3MisuseError(tls, int32(185349)) } if !(db != 0) || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return int32(SQLITE_NOMEM) @@ -165816,7 +166188,7 @@ func _createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc Tu8, pCtx ui enc2 = int32(SQLITE_UTF16LE) } if enc2 < int32(SQLITE_UTF8) || enc2 > int32(SQLITE_UTF16BE) { - return _sqlite3MisuseError(tls, int32(184327)) + return _sqlite3MisuseError(tls, int32(185397)) } /* Check if this call is removing or replacing an existing collation ** sequence. If so, and there are active VMs, return busy. If there @@ -165825,7 +166197,7 @@ func _createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc Tu8, pCtx ui pColl = _sqlite3FindCollSeq(tls, db, libc.Uint8FromInt32(enc2), zName, 0) if pColl != 0 && (*TCollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { - _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24763, 0) + _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24835, 0) return int32(SQLITE_BUSY) } _sqlite3ExpirePreparedStatements(tls, db, 0) @@ -165972,7 +166344,7 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u flags = *(*uint32)(unsafe.Pointer(pFlags)) zVfs = zDefaultVfs nUri = _sqlite3Strlen30(tls, zUri) - if (flags&uint32(SQLITE_OPEN_URI) != 0 || *(*Tu8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_sqlite3Config)) + 6)) != 0) && nUri >= int32(5) && libc.Xmemcmp(tls, zUri, __ccgo_ts+24831, uint64(5)) == 0 { /* Input character index */ + if (flags&uint32(SQLITE_OPEN_URI) != 0 || *(*Tu8)(unsafe.Pointer(uintptr(unsafe.Pointer(&_sqlite3Config)) + 6)) != 0) && nUri >= int32(5) && libc.Xmemcmp(tls, zUri, __ccgo_ts+24903, uint64(5)) == 0 { /* Input character index */ iOut = 0 /* Output character index */ nByte = libc.Uint64FromInt32(nUri + int32(8)) /* Bytes of space to allocate */ /* Make sure the SQLITE_OPEN_URI flag is set to indicate to the VFS xOpen @@ -166002,8 +166374,8 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u for *(*int8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0 && int32(*(*int8)(unsafe.Pointer(zUri + uintptr(iIn)))) != int32('/') { iIn++ } - if iIn != int32(7) && (iIn != int32(16) || libc.Xmemcmp(tls, __ccgo_ts+24837, zUri+7, uint64(9)) != 0) { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24847, libc.VaList(bp+8, iIn-int32(7), zUri+7)) + if iIn != int32(7) && (iIn != int32(16) || libc.Xmemcmp(tls, __ccgo_ts+24909, zUri+7, uint64(9)) != 0) { + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24919, libc.VaList(bp+8, iIn-int32(7), zUri+7)) rc = int32(SQLITE_ERROR) goto parse_uri_out } @@ -166092,24 +166464,24 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u nOpt = _sqlite3Strlen30(tls, zOpt) zVal = zOpt + uintptr(nOpt+int32(1)) nVal = _sqlite3Strlen30(tls, zVal) - if nOpt == int32(3) && libc.Xmemcmp(tls, __ccgo_ts+24875, zOpt, uint64(3)) == 0 { + if nOpt == int32(3) && libc.Xmemcmp(tls, __ccgo_ts+24947, zOpt, uint64(3)) == 0 { zVfs = zVal } else { aMode = uintptr(0) zModeType = uintptr(0) mask = 0 limit = 0 - if nOpt == int32(5) && libc.Xmemcmp(tls, __ccgo_ts+24879, zOpt, uint64(5)) == 0 { + if nOpt == int32(5) && libc.Xmemcmp(tls, __ccgo_ts+24951, zOpt, uint64(5)) == 0 { mask = libc.Int32FromInt32(SQLITE_OPEN_SHAREDCACHE) | libc.Int32FromInt32(SQLITE_OPEN_PRIVATECACHE) aMode = uintptr(unsafe.Pointer(&_aCacheMode)) limit = mask - zModeType = __ccgo_ts + 24879 + zModeType = __ccgo_ts + 24951 } - if nOpt == int32(4) && libc.Xmemcmp(tls, __ccgo_ts+24900, zOpt, uint64(4)) == 0 { + if nOpt == int32(4) && libc.Xmemcmp(tls, __ccgo_ts+24972, zOpt, uint64(4)) == 0 { mask = libc.Int32FromInt32(SQLITE_OPEN_READONLY) | libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_CREATE) | libc.Int32FromInt32(SQLITE_OPEN_MEMORY) aMode = uintptr(unsafe.Pointer(&_aOpenMode)) limit = libc.Int32FromUint32(libc.Uint32FromInt32(mask) & flags) - zModeType = __ccgo_ts + 3471 + zModeType = __ccgo_ts + 3497 } if aMode != 0 { mode = 0 @@ -166138,12 +166510,12 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u i++ } if mode == 0 { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24915, libc.VaList(bp+8, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24987, libc.VaList(bp+8, zModeType, zVal)) rc = int32(SQLITE_ERROR) goto parse_uri_out } if mode & ^libc.Int32FromInt32(SQLITE_OPEN_MEMORY) > limit { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24935, libc.VaList(bp+8, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+25007, libc.VaList(bp+8, zModeType, zVal)) rc = int32(SQLITE_PERM) goto parse_uri_out } @@ -166167,7 +166539,7 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u } *(*uintptr)(unsafe.Pointer(ppVfs)) = Xsqlite3_vfs_find(tls, zVfs) if *(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24959, libc.VaList(bp+8, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+25031, libc.VaList(bp+8, zVfs)) rc = int32(SQLITE_ERROR) } goto parse_uri_out @@ -166187,11 +166559,11 @@ var _aCacheMode = [3]struct { Fmode int32 }{ 0: { - Fz: __ccgo_ts + 24885, + Fz: __ccgo_ts + 24957, Fmode: int32(SQLITE_OPEN_SHAREDCACHE), }, 1: { - Fz: __ccgo_ts + 24892, + Fz: __ccgo_ts + 24964, Fmode: int32(SQLITE_OPEN_PRIVATECACHE), }, 2: {}, @@ -166202,19 +166574,19 @@ var _aOpenMode = [5]struct { Fmode int32 }{ 0: { - Fz: __ccgo_ts + 24905, + Fz: __ccgo_ts + 24977, Fmode: int32(SQLITE_OPEN_READONLY), }, 1: { - Fz: __ccgo_ts + 24908, + Fz: __ccgo_ts + 24980, Fmode: int32(SQLITE_OPEN_READWRITE), }, 2: { - Fz: __ccgo_ts + 24911, + Fz: __ccgo_ts + 24983, Fmode: libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_CREATE), }, 3: { - Fz: __ccgo_ts + 17918, + Fz: __ccgo_ts + 17990, Fmode: int32(SQLITE_OPEN_MEMORY), }, 4: {}, @@ -166342,8 +166714,8 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32 _createCollation(tls, db, uintptr(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_binCollFunc), uintptr(0)) _createCollation(tls, db, uintptr(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(SQLITE_UTF16BE), uintptr(0), __ccgo_fp(_binCollFunc), uintptr(0)) _createCollation(tls, db, uintptr(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), __ccgo_fp(_binCollFunc), uintptr(0)) - _createCollation(tls, db, __ccgo_ts+22579, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_nocaseCollatingFunc), uintptr(0)) - _createCollation(tls, db, __ccgo_ts+24975, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rtrimCollFunc), uintptr(0)) + _createCollation(tls, db, __ccgo_ts+22651, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_nocaseCollatingFunc), uintptr(0)) + _createCollation(tls, db, __ccgo_ts+25047, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rtrimCollFunc), uintptr(0)) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { goto opendb_out } @@ -166364,10 +166736,10 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32 /* READWRITE */ /* READWRITE | CREATE */ if int32(1)<<(*(*uint32)(unsafe.Pointer(bp))&uint32(7))&int32(0x46) == 0 { - rc = _sqlite3MisuseError(tls, int32(185002)) /* IMP: R-18321-05872 */ + rc = _sqlite3MisuseError(tls, int32(186072)) /* IMP: R-18321-05872 */ } else { if zFilename == uintptr(0) { - zFilename = __ccgo_ts + 4257 + zFilename = __ccgo_ts + 4283 } rc = _sqlite3ParseUri(tls, zVfs, zFilename, bp, db, bp+8, bp+16) } @@ -166376,7 +166748,7 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32 _sqlite3OomFault(tls, db) } if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { - v2 = __ccgo_ts + 3862 + v2 = __ccgo_ts + 3888 } else { v2 = uintptr(0) } @@ -166403,9 +166775,9 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32 /* The default safety_level for the main database is FULL; for the temp ** database it is OFF. This matches the pager layer defaults. */ - (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FzDbSName = __ccgo_ts + 6713 + (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FzDbSName = __ccgo_ts + 6738 (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).Fsafety_level = libc.Uint8FromInt32(libc.Int32FromInt32(SQLITE_DEFAULT_SYNCHRONOUS) + libc.Int32FromInt32(1)) - (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FzDbSName = __ccgo_ts + 23977 + (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).FzDbSName = __ccgo_ts + 24049 (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*32))).Fsafety_level = uint8(PAGER_SYNCHRONOUS_OFF) (*Tsqlite3)(unsafe.Pointer(db)).FeOpenState = uint8(SQLITE_STATE_OPEN) if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -166499,7 +166871,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) (r int32) { return rc } if zFilename == uintptr(0) { - zFilename = __ccgo_ts + 24981 + zFilename = __ccgo_ts + 25053 } pVal = _sqlite3ValueNew(tls, uintptr(0)) _sqlite3ValueSetStr(tls, pVal, -int32(1), zFilename, uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(0)) @@ -166659,7 +167031,7 @@ func Xsqlite3_set_clientdata(tls *libc.TLS, db uintptr, zName uintptr, pData uin return SQLITE_OK } else { n = libc.Xstrlen(tls, zName) - p = Xsqlite3_malloc64(tls, uint64(32)+n+uint64(1)) + p = Xsqlite3_malloc64(tls, uint64(uint64(libc.UintptrFromInt32(0)+24)+(n+libc.Uint64FromInt32(1)))) if p == uintptr(0) { if xDestructor != 0 { (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{xDestructor})))(tls, pData) @@ -166716,20 +167088,20 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) (r int32) { func _sqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) (r int32) { bp := tls.Alloc(32) defer tls.Free(32) - Xsqlite3_log(tls, iErr, __ccgo_ts+24984, libc.VaList(bp+8, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) + Xsqlite3_log(tls, iErr, __ccgo_ts+25056, libc.VaList(bp+8, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } func _sqlite3CorruptError(tls *libc.TLS, lineno int32) (r int32) { - return _sqlite3ReportError(tls, int32(SQLITE_CORRUPT), lineno, __ccgo_ts+25009) + return _sqlite3ReportError(tls, int32(SQLITE_CORRUPT), lineno, __ccgo_ts+25081) } func _sqlite3MisuseError(tls *libc.TLS, lineno int32) (r int32) { - return _sqlite3ReportError(tls, int32(SQLITE_MISUSE), lineno, __ccgo_ts+25029) + return _sqlite3ReportError(tls, int32(SQLITE_MISUSE), lineno, __ccgo_ts+25101) } func _sqlite3CantopenError(tls *libc.TLS, lineno int32) (r int32) { - return _sqlite3ReportError(tls, int32(SQLITE_CANTOPEN), lineno, __ccgo_ts+25036) + return _sqlite3ReportError(tls, int32(SQLITE_CANTOPEN), lineno, __ccgo_ts+25108) } // C documentation @@ -166754,9 +167126,9 @@ func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, bp := tls.Alloc(32) defer tls.Free(32) var autoinc, iCol, notnull, primarykey, rc int32 - var pCol, pTab, zCollSeq, zDataType, v2, v3 uintptr + var pCol, pTab, zCollSeq, zDataType, v1, v2 uintptr var _ /* zErrMsg at bp+0 */ uintptr - _, _, _, _, _, _, _, _, _, _, _ = autoinc, iCol, notnull, pCol, pTab, primarykey, rc, zCollSeq, zDataType, v2, v3 + _, _, _, _, _, _, _, _, _, _, _ = autoinc, iCol, notnull, pCol, pTab, primarykey, rc, zCollSeq, zDataType, v1, v2 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) pTab = uintptr(0) pCol = uintptr(0) @@ -166783,29 +167155,18 @@ func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, if zColumnName == uintptr(0) { /* Query for existence of table only */ } else { - iCol = 0 - for { - if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) { - break - } + iCol = _sqlite3ColumnIndex(tls, pTab, zColumnName) + if iCol >= 0 { pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16 - if 0 == _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zColumnName) { - break - } - goto _1 - _1: - ; - iCol++ - } - if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) { + } else { if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) && _sqlite3IsRowid(tls, zColumnName) != 0 { iCol = int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) if iCol >= 0 { - v2 = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16 + v1 = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16 } else { - v2 = uintptr(0) + v1 = uintptr(0) } - pCol = v2 + pCol = v1 } else { pTab = uintptr(0) goto error_out @@ -166860,15 +167221,15 @@ error_out: } if SQLITE_OK == rc && !(pTab != 0) { _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) - *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+25053, libc.VaList(bp+16, zTableName, zColumnName)) + *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+25125, libc.VaList(bp+16, zTableName, zColumnName)) rc = int32(SQLITE_ERROR) } if *(*uintptr)(unsafe.Pointer(bp)) != 0 { - v3 = __ccgo_ts + 3862 + v2 = __ccgo_ts + 3888 } else { - v3 = uintptr(0) + v2 = uintptr(0) } - _sqlite3ErrorWithMsg(tls, db, rc, v3, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) + _sqlite3ErrorWithMsg(tls, db, rc, v2, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp)))) _sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp))) rc = _sqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex) @@ -167047,8 +167408,8 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) (r int32) { /* sqlite3_test_control(SQLITE_TESTCTRL_FK_NO_ACTION, sqlite3 *db, int b); ** ** If b is true, then activate the SQLITE_FkNoAction setting. If b is - ** false then clearn that setting. If the SQLITE_FkNoAction setting is - ** abled, all foreign key ON DELETE and ON UPDATE actions behave as if + ** false then clear that setting. If the SQLITE_FkNoAction setting is + ** enabled, all foreign key ON DELETE and ON UPDATE actions behave as if ** they were NO ACTION, regardless of how they are defined. ** ** NB: One must usually run "PRAGMA writable_schema=RESET" after @@ -167888,7 +168249,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) (r int32) { var _ /* nOpt at bp+0 */ int32 _, _, _ = azCompileOpt, i, n azCompileOpt = _sqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, __ccgo_ts+25081, int32(7)) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, __ccgo_ts+25153, int32(7)) == 0 { zOptName += uintptr(7) } n = _sqlite3Strlen30(tls, zOptName) @@ -168106,7 +168467,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, _pArg ui } _leaveMutex(tls) if rc != 0 { - v2 = __ccgo_ts + 25089 + v2 = __ccgo_ts + 25161 } else { v2 = uintptr(0) } @@ -168352,7 +168713,7 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { ** Here, array { X } means zero or more occurrences of X, adjacent in ** memory. A "position" is an index of a token in the token stream ** generated by the tokenizer. Note that POS_END and POS_COLUMN occur -** in the same logical place as the position element, and act as sentinals +** in the same logical place as the position element, and act as sentinels ** ending a position list array. POS_END is 0. POS_COLUMN is 1. ** The positions numbers are not stored literally but rather as two more ** than the difference from the prior position, or the just the position plus @@ -168569,6 +168930,13 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { ** */ +/* #include <assert.h> */ +/* #include <stdlib.h> */ +/* #include <stddef.h> */ +/* #include <stdio.h> */ +/* #include <string.h> */ +/* #include <stdarg.h> */ + /* FTS3/FTS4 require virtual tables */ /* @@ -168881,8 +169249,8 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { ** Beginning with version 3.45.0 (circa 2024-01-01), these routines also ** accept BLOB values that have JSON encoded using a binary representation ** called "JSONB". The name JSONB comes from PostgreSQL, however the on-disk -** format SQLite JSONB is completely different and incompatible with -** PostgreSQL JSONB. +** format for SQLite-JSONB is completely different and incompatible with +** PostgreSQL-JSONB. ** ** Decoding and interpreting JSONB is still O(N) where N is the size of ** the input, the same as text JSON. However, the constant of proportionality @@ -168939,7 +169307,7 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { ** ** The payload size need not be expressed in its minimal form. For example, ** if the payload size is 10, the size can be expressed in any of 5 different -** ways: (1) (X>>4)==10, (2) (X>>4)==12 following by on 0x0a byte, +** ways: (1) (X>>4)==10, (2) (X>>4)==12 following by one 0x0a byte, ** (3) (X>>4)==13 followed by 0x00 and 0x0a, (4) (X>>4)==14 followed by ** 0x00 0x00 0x00 0x0a, or (5) (X>>4)==15 followed by 7 bytes of 0x00 and ** a single byte of 0x0a. The shorter forms are preferred, of course, but @@ -168949,7 +169317,7 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { ** the size when it becomes known, resulting in a non-minimal encoding. ** ** The value (X>>4)==15 is not actually used in the current implementation -** (as SQLite is currently unable handle BLOBs larger than about 2GB) +** (as SQLite is currently unable to handle BLOBs larger than about 2GB) ** but is included in the design to allow for future enhancements. ** ** The payload follows the header. NULL, TRUE, and FALSE have no payload and @@ -168987,18 +169355,18 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { // */ var _jsonbType = [17]uintptr{ 0: __ccgo_ts + 1651, - 1: __ccgo_ts + 8075, - 2: __ccgo_ts + 8080, - 3: __ccgo_ts + 6389, - 4: __ccgo_ts + 6389, - 5: __ccgo_ts + 6384, - 6: __ccgo_ts + 6384, - 7: __ccgo_ts + 8386, - 8: __ccgo_ts + 8386, - 9: __ccgo_ts + 8386, - 10: __ccgo_ts + 8386, - 11: __ccgo_ts + 25112, - 12: __ccgo_ts + 25118, + 1: __ccgo_ts + 8100, + 2: __ccgo_ts + 8105, + 3: __ccgo_ts + 6414, + 4: __ccgo_ts + 6414, + 5: __ccgo_ts + 6409, + 6: __ccgo_ts + 6409, + 7: __ccgo_ts + 8411, + 8: __ccgo_ts + 8411, + 9: __ccgo_ts + 8411, + 10: __ccgo_ts + 8411, + 11: __ccgo_ts + 25184, + 12: __ccgo_ts + 25190, 13: __ccgo_ts + 1665, 14: __ccgo_ts + 1665, 15: __ccgo_ts + 1665, @@ -169485,7 +169853,7 @@ func _jsonCacheInsert(tls *libc.TLS, ctx uintptr, pParse uintptr) (r int32) { // ** most-recently used entry if it isn't so already. // ** // ** The JsonParse object returned still belongs to the Cache and might -// ** be deleted at any moment. If the caller whants the JsonParse to +// ** be deleted at any moment. If the caller wants the JsonParse to // ** linger, it needs to increment the nPJRef reference counter. // */ func _jsonCacheSearch(tls *libc.TLS, ctx uintptr, pArg uintptr) (r uintptr) { @@ -169783,8 +170151,8 @@ func _jsonAppendControlChar(tls *libc.TLS, p uintptr, c Tu8) { *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(1)))) = int8('u') *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(2)))) = int8('0') *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(3)))) = int8('0') - *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(4)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 25125 + uintptr(libc.Int32FromUint8(c)>>int32(4)))) - *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(5)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 25125 + uintptr(libc.Int32FromUint8(c)&int32(0xf)))) + *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(4)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 1687 + uintptr(libc.Int32FromUint8(c)>>int32(4)))) + *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(5)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 1687 + uintptr(libc.Int32FromUint8(c)&int32(0xf)))) *(*Tu64)(unsafe.Pointer(p + 24)) += uint64(6) } } @@ -169920,7 +170288,7 @@ func _jsonAppendSqlValue(tls *libc.TLS, p uintptr, pValue uintptr) { case int32(SQLITE_NULL): _jsonAppendRawNZ(tls, p, __ccgo_ts+1651, uint32(4)) case int32(SQLITE_FLOAT): - _jsonPrintf(tls, int32(100), p, __ccgo_ts+15480, libc.VaList(bp+80, Xsqlite3_value_double(tls, pValue))) + _jsonPrintf(tls, int32(100), p, __ccgo_ts+15505, libc.VaList(bp+80, Xsqlite3_value_double(tls, pValue))) case int32(SQLITE_INTEGER): z = Xsqlite3_value_text(tls, pValue) n = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pValue)) @@ -169934,14 +170302,12 @@ func _jsonAppendSqlValue(tls *libc.TLS, p uintptr, pValue uintptr) { _jsonAppendString(tls, p, z1, n1) } default: - if _jsonFuncArgMightBeBinary(tls, pValue) != 0 { - libc.Xmemset(tls, bp, 0, uint64(72)) - (*(*TJsonParse)(unsafe.Pointer(bp))).FaBlob = Xsqlite3_value_blob(tls, pValue) - (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pValue)) + libc.Xmemset(tls, bp, 0, uint64(72)) + if _jsonArgIsJsonb(tls, pValue, bp) != 0 { _jsonTranslateBlobToText(tls, bp, uint32(0), p) } else { if libc.Int32FromUint8((*TJsonString)(unsafe.Pointer(p)).FeErr) == 0 { - Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25142, -int32(1)) + Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25197, -int32(1)) (*TJsonString)(unsafe.Pointer(p)).FeErr = uint8(JSTRING_ERR) _jsonStringReset(tls, p) } @@ -169995,7 +170361,7 @@ func _jsonReturnString(tls *libc.TLS, p uintptr, pParse uintptr, ctx uintptr) { Xsqlite3_result_error_nomem(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx) } else { if libc.Int32FromUint8((*TJsonString)(unsafe.Pointer(p)).FeErr)&int32(JSTRING_MALFORMED) != 0 { - Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25226, -int32(1)) } } } @@ -170278,8 +170644,8 @@ var _aNanInfName = [5]TNanInfName{ Fn: int8(3), FeType: int8(JSONB_FLOAT), FnRepl: int8(7), - FzMatch: __ccgo_ts + 25186, - FzRepl: __ccgo_ts + 25190, + FzMatch: __ccgo_ts + 25241, + FzRepl: __ccgo_ts + 25245, }, 1: { Fc1: int8('i'), @@ -170287,8 +170653,8 @@ var _aNanInfName = [5]TNanInfName{ Fn: int8(8), FeType: int8(JSONB_FLOAT), FnRepl: int8(7), - FzMatch: __ccgo_ts + 25198, - FzRepl: __ccgo_ts + 25190, + FzMatch: __ccgo_ts + 25253, + FzRepl: __ccgo_ts + 25245, }, 2: { Fc1: int8('n'), @@ -170303,7 +170669,7 @@ var _aNanInfName = [5]TNanInfName{ Fc2: int8('Q'), Fn: int8(4), FnRepl: int8(4), - FzMatch: __ccgo_ts + 25207, + FzMatch: __ccgo_ts + 25262, FzRepl: __ccgo_ts + 1651, }, 4: { @@ -170311,7 +170677,7 @@ var _aNanInfName = [5]TNanInfName{ Fc2: int8('S'), Fn: int8(4), FnRepl: int8(4), - FzMatch: __ccgo_ts + 25212, + FzMatch: __ccgo_ts + 25267, FzRepl: __ccgo_ts + 1651, }, } @@ -170327,7 +170693,7 @@ func _jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { defer tls.Free(16) var zMsg uintptr _ = zMsg - zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25217, libc.VaList(bp+8, zFuncName)) + zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25272, libc.VaList(bp+8, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -int32(1)) Xsqlite3_free(tls, zMsg) } @@ -170345,23 +170711,23 @@ func _jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { // */ func _jsonBlobExpand(tls *libc.TLS, pParse uintptr, N Tu32) (r int32) { var aNew uintptr - var t Tu32 + var t Tu64 _, _ = aNew, t if (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc == uint32(0) { - t = uint32(100) + t = uint64(100) } else { - t = (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc * uint32(2) + t = uint64((*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc * uint32(2)) } - if t < N { - t = N + uint32(100) + if t < uint64(N) { + t = uint64(N + uint32(100)) } - aNew = _sqlite3DbRealloc(tls, (*TJsonParse)(unsafe.Pointer(pParse)).Fdb, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob, uint64(t)) + aNew = _sqlite3DbRealloc(tls, (*TJsonParse)(unsafe.Pointer(pParse)).Fdb, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob, t) if aNew == uintptr(0) { (*TJsonParse)(unsafe.Pointer(pParse)).Foom = uint8(1) return int32(1) } (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob = aNew - (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc = t + (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc = uint32(t) return 0 } @@ -170439,7 +170805,7 @@ func _jsonBlobExpandAndAppendNode(tls *libc.TLS, pParse uintptr, eType Tu8, szPa // C documentation // -// /* Append an node type byte together with the payload size and +// /* Append a node type byte together with the payload size and // ** possibly also the payload. // ** // ** If aPayload is not NULL, then it is a pointer to the payload which @@ -170510,7 +170876,11 @@ func _jsonBlobChangePayloadSize(tls *libc.TLS, pParse uintptr, i Tu32, szPayload if libc.Int32FromUint8(szType) == int32(13) { nExtra = uint8(2) } else { - nExtra = uint8(4) + if libc.Int32FromUint8(szType) == int32(14) { + nExtra = uint8(4) + } else { + nExtra = uint8(8) + } } } } @@ -170785,7 +171155,7 @@ func _jsonbValidityCheck(tls *libc.TLS, pParse uintptr, i Tu32, iEnd Tu32, iDept if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j)))) != int32('\\') || j+uint32(1) >= k { return j + uint32(1) } else { - if libc.Xstrchr(tls, __ccgo_ts+25260, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) != uintptr(0) { + if libc.Xstrchr(tls, __ccgo_ts+25315, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) != uintptr(0) { j++ } else { if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j+uint32(1))))) == int32('u') { @@ -171215,7 +171585,7 @@ parse_string: opcode = uint8(JSONB_TEXTJ) } } else { - if int32(c) == int32('\'') || int32(c) == int32('0') || int32(c) == int32('v') || int32(c) == int32('\n') || int32(0xe2) == libc.Int32FromUint8(libc.Uint8FromInt8(c)) && int32(0x80) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) && (int32(0xa8) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2)))))) || int32(0xa9) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2))))))) || int32(c) == int32('x') && _jsonIs2Hex(tls, z+uintptr(j+uint32(1))) != 0 { + if int32(c) == int32('\'') || int32(c) == int32('v') || int32(c) == int32('\n') || int32(c) == int32('0') && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))])&libc.Int32FromInt32(0x04) != 0) || int32(0xe2) == libc.Int32FromUint8(libc.Uint8FromInt8(c)) && int32(0x80) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) && (int32(0xa8) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2)))))) || int32(0xa9) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2))))))) || int32(c) == int32('x') && _jsonIs2Hex(tls, z+uintptr(j+uint32(1))) != 0 { opcode = uint8(JSONB_TEXT5) (*TJsonParse)(unsafe.Pointer(pParse)).FhasNonstd = uint8(1) } else { @@ -171254,7 +171624,7 @@ parse_string: return libc.Int32FromUint32(j + uint32(1)) _5: ; - if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8075, uint64(4)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(4)))))])&libc.Int32FromInt32(0x06) != 0) { + if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8100, uint64(4)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(4)))))])&libc.Int32FromInt32(0x06) != 0) { _jsonBlobAppendOneByte(tls, pParse, uint8(JSONB_TRUE)) return libc.Int32FromUint32(i + uint32(4)) } @@ -171262,7 +171632,7 @@ _5: return -int32(1) _6: ; - if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8080, uint64(5)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(5)))))])&libc.Int32FromInt32(0x06) != 0) { + if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8105, uint64(5)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(5)))))])&libc.Int32FromInt32(0x06) != 0) { _jsonBlobAppendOneByte(tls, pParse, uint8(JSONB_FALSE)) return libc.Int32FromUint32(i + uint32(5)) } @@ -171339,14 +171709,14 @@ parse_number: /* JSON5 allows for "+Infinity" and "-Infinity" using exactly ** that case. SQLite also allows these in any case and it allows ** "+inf" and "-inf". */ - if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('I') || int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('i')) && Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(1)), __ccgo_ts+25186, int32(3)) == 0 { + if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('I') || int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('i')) && Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(1)), __ccgo_ts+25241, int32(3)) == 0 { (*TJsonParse)(unsafe.Pointer(pParse)).FhasNonstd = uint8(1) if int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == int32('-') { - _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25269) + _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25324) } else { - _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25276) + _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25331) } - if Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(4)), __ccgo_ts+25282, int32(5)) == 0 { + if Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(4)), __ccgo_ts+25337, int32(5)) == 0 { v48 = int32(9) } else { v48 = int32(4) @@ -171531,7 +171901,7 @@ _38: goto _51 } if int32(_aNanInfName[k1].FeType) == int32(JSONB_FLOAT) { - _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25276) + _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25331) } else { _jsonBlobAppendOneByte(tls, pParse, uint8(JSONB_NULL)) } @@ -171576,7 +171946,7 @@ func _jsonConvertTextToBlob(tls *libc.TLS, pParse uintptr, pCtx uintptr) (r int3 i += _json5Whitespace(tls, zJson+uintptr(i)) if *(*int8)(unsafe.Pointer(zJson + uintptr(i))) != 0 { if pCtx != 0 { - Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25226, -int32(1)) } _jsonParseReset(tls, pParse) return int32(1) @@ -171589,7 +171959,7 @@ func _jsonConvertTextToBlob(tls *libc.TLS, pParse uintptr, pCtx uintptr) (r int3 if (*TJsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25226, -int32(1)) } } _jsonParseReset(tls, pParse) @@ -171638,10 +172008,6 @@ func _jsonbPayloadSize(tls *libc.TLS, pParse uintptr, i Tu32, pSz uintptr) (r Tu var n, sz Tu32 var x Tu8 _, _, _ = n, sz, x - if i > (*TJsonParse)(unsafe.Pointer(pParse)).FnBlob { - *(*Tu32)(unsafe.Pointer(pSz)) = uint32(0) - return uint32(0) - } x = libc.Uint8FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i)))) >> int32(4)) if libc.Int32FromUint8(x) <= int32(11) { sz = uint32(x) @@ -171675,15 +172041,15 @@ func _jsonbPayloadSize(tls *libc.TLS, pParse uintptr, i Tu32, pSz uintptr) (r Tu *(*Tu32)(unsafe.Pointer(pSz)) = uint32(0) return uint32(0) } - sz = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(5)))))<<int32(24) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(6)))))<<int32(16) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(7)))))<<int32(8) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(8)))))) + sz = uint32(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(5)))))<<libc.Int32FromInt32(24) + libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(6)))))<<libc.Int32FromInt32(16)) + libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(7)))))<<libc.Int32FromInt32(8)) + uint32(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(8))))) n = uint32(9) } } } } if libc.Int64FromUint32(i)+libc.Int64FromUint32(sz)+libc.Int64FromUint32(n) > libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob) && libc.Int64FromUint32(i)+libc.Int64FromUint32(sz)+libc.Int64FromUint32(n) > libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob-libc.Uint32FromInt32((*TJsonParse)(unsafe.Pointer(pParse)).Fdelta)) { - sz = uint32(0) - n = uint32(0) + *(*Tu32)(unsafe.Pointer(pSz)) = uint32(0) + return uint32(0) } *(*Tu32)(unsafe.Pointer(pSz)) = sz return n @@ -171756,11 +172122,11 @@ _2: return i + uint32(1) _3: ; - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8075, uint32(4)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8100, uint32(4)) return i + uint32(1) _4: ; - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8080, uint32(5)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8105, uint32(5)) return i + uint32(1) _6: ; @@ -171809,9 +172175,9 @@ _7: k++ } if bOverflow != 0 { - v19 = __ccgo_ts + 25190 + v19 = __ccgo_ts + 25245 } else { - v19 = __ccgo_ts + 11942 + v19 = __ccgo_ts + 11967 } _jsonPrintf(tls, int32(100), pOut, v19, libc.VaList(bp+16, u)) goto _16 @@ -171847,9 +172213,12 @@ _10: ; _9: ; - _jsonAppendChar(tls, pOut, int8('"')) - _jsonAppendRaw(tls, pOut, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob+uintptr(i+n), *(*Tu32)(unsafe.Pointer(bp))) - _jsonAppendChar(tls, pOut, int8('"')) + if (*TJsonString)(unsafe.Pointer(pOut)).FnUsed+uint64(*(*Tu32)(unsafe.Pointer(bp)))+uint64(2) <= (*TJsonString)(unsafe.Pointer(pOut)).FnAlloc || _jsonStringGrow(tls, pOut, *(*Tu32)(unsafe.Pointer(bp))+uint32(2)) == 0 { + *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(pOut)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(pOut)).FnUsed))) = int8('"') + libc.Xmemcpy(tls, (*TJsonString)(unsafe.Pointer(pOut)).FzBuf+uintptr((*TJsonString)(unsafe.Pointer(pOut)).FnUsed)+uintptr(1), (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob+uintptr(i+n), uint64(*(*Tu32)(unsafe.Pointer(bp)))) + *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(pOut)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(pOut)).FnUsed+uint64(*(*Tu32)(unsafe.Pointer(bp)))+uint64(1)))) = int8('"') + *(*Tu64)(unsafe.Pointer(pOut + 24)) += uint64(*(*Tu32)(unsafe.Pointer(bp)) + uint32(2)) + } goto _16 _11: ; @@ -171876,7 +172245,7 @@ _11: sz2 -= k2 } if int32(*(*int8)(unsafe.Pointer(zIn2))) == int32('"') { - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25288, uint32(2)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25343, uint32(2)) zIn2++ sz2-- continue @@ -171899,7 +172268,7 @@ _11: case int32('\''): _jsonAppendChar(tls, pOut, int8('\'')) case int32('v'): - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25291, uint32(6)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25346, uint32(6)) case int32('x'): if sz2 < uint32(4) { p23 = pOut + 33 @@ -171907,12 +172276,12 @@ _11: sz2 = uint32(2) break } - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25298, uint32(4)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25353, uint32(4)) _jsonAppendRawNZ(tls, pOut, zIn2+2, uint32(2)) zIn2 += uintptr(2) sz2 -= uint32(2) case int32('0'): - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25303, uint32(6)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25358, uint32(6)) case int32('\r'): if sz2 > uint32(2) && int32(*(*int8)(unsafe.Pointer(zIn2 + 2))) == int32('\n') { zIn2++ @@ -172092,7 +172461,7 @@ func _jsonTranslateBlobToPrettyText(tls *libc.TLS, pPretty uintptr, i Tu32) (r T if j >= iEnd { break } - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25310, uint32(2)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25365, uint32(2)) } _jsonAppendChar(tls, pOut, int8('\n')) (*TJsonPretty)(unsafe.Pointer(pPretty)).FnIndent-- @@ -172115,12 +172484,12 @@ func _jsonTranslateBlobToPrettyText(tls *libc.TLS, pPretty uintptr, i Tu32) (r T *(*Tu8)(unsafe.Pointer(p2)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p2))) | libc.Int32FromInt32(JSTRING_MALFORMED)) break } - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25313, uint32(2)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25368, uint32(2)) j = _jsonTranslateBlobToPrettyText(tls, pPretty, j) if j >= iEnd { break } - _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25310, uint32(2)) + _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25365, uint32(2)) } _jsonAppendChar(tls, pOut, int8('\n')) (*TJsonPretty)(unsafe.Pointer(pPretty)).FnIndent-- @@ -172137,50 +172506,6 @@ func _jsonTranslateBlobToPrettyText(tls *libc.TLS, pPretty uintptr, i Tu32) (r T // C documentation // -// /* Return true if the input pJson -// ** -// ** For performance reasons, this routine does not do a detailed check of the -// ** input BLOB to ensure that it is well-formed. Hence, false positives are -// ** possible. False negatives should never occur, however. -// */ -func _jsonFuncArgMightBeBinary(tls *libc.TLS, pJson uintptr) (r int32) { - bp := tls.Alloc(80) - defer tls.Free(80) - var aBlob uintptr - var n Tu32 - var nBlob int32 - var _ /* s at bp+8 */ TJsonParse - var _ /* sz at bp+0 */ Tu32 - _, _, _ = aBlob, n, nBlob - if Xsqlite3_value_type(tls, pJson) != int32(SQLITE_BLOB) { - return 0 - } - aBlob = Xsqlite3_value_blob(tls, pJson) - nBlob = Xsqlite3_value_bytes(tls, pJson) - if nBlob < int32(1) { - return 0 - } - if aBlob == uintptr(0) || libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aBlob)))&int32(0x0f) > int32(JSONB_OBJECT) { - return 0 - } - libc.Xmemset(tls, bp+8, 0, uint64(72)) - (*(*TJsonParse)(unsafe.Pointer(bp + 8))).FaBlob = aBlob - (*(*TJsonParse)(unsafe.Pointer(bp + 8))).FnBlob = libc.Uint32FromInt32(nBlob) - n = _jsonbPayloadSize(tls, bp+8, uint32(0), bp) - if n == uint32(0) { - return 0 - } - if *(*Tu32)(unsafe.Pointer(bp))+n != libc.Uint32FromInt32(nBlob) { - return 0 - } - if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aBlob)))&int32(0x0f) <= int32(JSONB_FALSE) && *(*Tu32)(unsafe.Pointer(bp)) > uint32(0) { - return 0 - } - return libc.BoolInt32(*(*Tu32)(unsafe.Pointer(bp))+n == libc.Uint32FromInt32(nBlob)) -} - -// C documentation -// // /* // ** Given that a JSONB_ARRAY object starts at offset i, return // ** the number of entries in that array. @@ -172233,6 +172558,84 @@ func _jsonAfterEditSizeAdjust(tls *libc.TLS, pParse uintptr, iRoot Tu32) { // C documentation // // /* +// ** If the JSONB at aIns[0..nIns-1] can be expanded (by denormalizing the +// ** size field) by d bytes, then write the expansion into aOut[] and +// ** return true. In this way, an overwrite happens without changing the +// ** size of the JSONB, which reduces memcpy() operations and also make it +// ** faster and easier to update the B-Tree entry that contains the JSONB +// ** in the database. +// ** +// ** If the expansion of aIns[] by d bytes cannot be (easily) accomplished +// ** then return false. +// ** +// ** The d parameter is guaranteed to be between 1 and 8. +// ** +// ** This routine is an optimization. A correct answer is obtained if it +// ** always leaves the output unchanged and returns false. +// */ +func _jsonBlobOverwrite(tls *libc.TLS, aOut uintptr, aIns uintptr, nIns Tu32, d Tu32) (r int32) { + var i, szPayload Tu32 + var szHdr Tu8 + _, _, _ = i, szHdr, szPayload /* Size of header before expansion */ + if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aIns)))&int32(0x0f) <= int32(2) { + return 0 + } /* Cannot enlarge NULL, true, false */ + switch libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aIns))) >> libc.Int32FromInt32(4) { + default: /* aIns[] header size 1 */ + if int32(1)<<d&int32(0x116) == 0 { + return 0 + } /* d must be 1, 2, 4, or 8 */ + i = d + uint32(1) /* New hdr sz: 2, 3, 5, or 9 */ + szHdr = uint8(1) + case int32(12): /* aIns[] header size is 2 */ + if int32(1)<<d&int32(0x8a) == 0 { + return 0 + } /* d must be 1, 3, or 7 */ + i = d + uint32(2) /* New hdr sz: 2, 5, or 9 */ + szHdr = uint8(2) + case int32(13): /* aIns[] header size is 3 */ + if d != uint32(2) && d != uint32(6) { + return 0 + } /* d must be 2 or 6 */ + i = d + uint32(3) /* New hdr sz: 5 or 9 */ + szHdr = uint8(3) + case int32(14): /* aIns[] header size is 5 */ + if d != uint32(4) { + return 0 + } /* d must be 4 */ + i = uint32(9) /* New hdr sz: 9 */ + szHdr = uint8(5) + case int32(15): /* aIns[] header size is 9 */ + return 0 /* No solution */ + } + *(*Tu8)(unsafe.Pointer(aOut)) = libc.Uint8FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aIns)))&int32(0x0f) | libc.Int32FromUint8(_aType1[i-uint32(2)])) + libc.Xmemcpy(tls, aOut+uintptr(i), aIns+uintptr(szHdr), uint64(nIns-uint32(szHdr))) + szPayload = nIns - uint32(szHdr) + for int32(1) != 0 { + i-- + *(*Tu8)(unsafe.Pointer(aOut + uintptr(i))) = uint8(szPayload & uint32(0xff)) + if i == uint32(1) { + break + } + szPayload >>= uint32(8) + } + return int32(1) +} + +/* Lookup table for finding the upper 4 bits of the first byte of the + ** expanded aIns[], based on the size of the expanded aIns[] header: + ** + ** 2 3 4 5 6 7 8 9 */ +var _aType1 = [8]Tu8{ + 0: uint8(0xc0), + 1: uint8(0xd0), + 3: uint8(0xe0), + 7: uint8(0xf0), +} + +// C documentation +// +// /* // ** Modify the JSONB blob at pParse->aBlob by removing nDel bytes of // ** content beginning at iDel, and replacing them with nIns bytes of // ** content given by aIns. @@ -172250,6 +172653,9 @@ func _jsonBlobEdit(tls *libc.TLS, pParse uintptr, iDel Tu32, nDel Tu32, aIns uin var p1, p2 uintptr _, _, _ = d, p1, p2 d = libc.Int64FromUint32(nIns) - libc.Int64FromUint32(nDel) + if d < 0 && d >= int64(-libc.Int32FromInt32(8)) && aIns != uintptr(0) && _jsonBlobOverwrite(tls, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob+uintptr(iDel), aIns, nIns, libc.Uint32FromInt32(int32(-d))) != 0 { + return + } if d != 0 { if libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob)+d > libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc) { _jsonBlobExpand(tls, pParse, libc.Uint32FromInt64(libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob)+d)) @@ -172322,9 +172728,9 @@ func _jsonBytesToBypass(tls *libc.TLS, z uintptr, n Tu32) (r Tu32) { // */ func _jsonUnescapeOneChar(tls *libc.TLS, z uintptr, n Tu32, piOut uintptr) (r Tu32) { var nSkip, v, vlo, v1 Tu32 - var sz int32 + var sz, v3 int32 var v2 bool - _, _, _, _, _, _ = nSkip, sz, v, vlo, v1, v2 + _, _, _, _, _, _, _ = nSkip, sz, v, vlo, v1, v2, v3 if n < uint32(2) { *(*Tu32)(unsafe.Pointer(piOut)) = uint32(JSON_INVALID_CHAR) return n @@ -172367,7 +172773,18 @@ func _jsonUnescapeOneChar(tls *libc.TLS, z uintptr, n Tu32, piOut uintptr) (r Tu *(*Tu32)(unsafe.Pointer(piOut)) = uint32('\v') return uint32(2) case int32('0'): - *(*Tu32)(unsafe.Pointer(piOut)) = uint32(0) + /* JSON5 requires that the \0 escape not be followed by a digit. + ** But SQLite did not enforce this restriction in versions 3.42.0 + ** through 3.49.2. That was a bug. But some applications might have + ** come to depend on that bug. Use the SQLITE_BUG_COMPATIBLE_20250510 + ** option to restore the old buggy behavior. */ + /* Correct behavior */ + if n > uint32(2) && libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + 2)))])&int32(0x04) != 0 { + v3 = int32(JSON_INVALID_CHAR) + } else { + v3 = 0 + } + *(*Tu32)(unsafe.Pointer(piOut)) = libc.Uint32FromInt32(v3) return uint32(2) case int32('\''): fallthrough @@ -172855,7 +173272,7 @@ func _jsonReturnFromBlob(tls *libc.TLS, pParse uintptr, i Tu32, pCtx uintptr, te db = Xsqlite3_context_db_handle(tls, pCtx) n = _jsonbPayloadSize(tls, pParse, i, bp) if n == uint32(0) { - Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25226, -int32(1)) return } switch libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i)))) & libc.Int32FromInt32(0x0f) { @@ -172990,7 +173407,7 @@ _10: ; nOut = *(*Tu32)(unsafe.Pointer(bp)) z2 = (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+n) - zOut = _sqlite3DbMallocRaw(tls, db, uint64(nOut+uint32(1))) + zOut = _sqlite3DbMallocRaw(tls, db, uint64(nOut)+uint64(1)) if zOut == uintptr(0) { goto returnfromblob_oom } @@ -173091,7 +173508,7 @@ returnfromblob_oom: goto returnfromblob_malformed returnfromblob_malformed: ; - Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25226, -int32(1)) return } @@ -173128,11 +173545,8 @@ func _jsonFunctionArgToBlob(tls *libc.TLS, ctx uintptr, pArg uintptr, pParse uin (*TJsonParse)(unsafe.Pointer(pParse)).FnBlob = uint32(1) return 0 case int32(SQLITE_BLOB): - if _jsonFuncArgMightBeBinary(tls, pArg) != 0 { - (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob = Xsqlite3_value_blob(tls, pArg) - (*TJsonParse)(unsafe.Pointer(pParse)).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pArg)) - } else { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25142, -int32(1)) + if !(_jsonArgIsJsonb(tls, pArg, pParse) != 0) { + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25197, -int32(1)) return int32(1) } case int32(SQLITE_TEXT): @@ -173145,7 +173559,7 @@ func _jsonFunctionArgToBlob(tls *libc.TLS, ctx uintptr, pArg uintptr, pParse uin (*TJsonParse)(unsafe.Pointer(pParse)).FzJson = zJson (*TJsonParse)(unsafe.Pointer(pParse)).FnJson = nJson if _jsonConvertTextToBlob(tls, pParse, ctx) != 0 { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) _sqlite3DbFree(tls, (*TJsonParse)(unsafe.Pointer(pParse)).Fdb, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob) libc.Xmemset(tls, pParse, 0, uint64(72)) return int32(1) @@ -173164,10 +173578,10 @@ func _jsonFunctionArgToBlob(tls *libc.TLS, ctx uintptr, pArg uintptr, pParse uin return int32(1) } if int32(*(*int8)(unsafe.Pointer(z))) == int32('I') { - _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25276) + _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25331) } else { if int32(*(*int8)(unsafe.Pointer(z))) == int32('-') && int32(*(*int8)(unsafe.Pointer(z + 1))) == int32('I') { - _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25269) + _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25324) } else { _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), libc.Uint32FromInt32(n), z) } @@ -173206,7 +173620,7 @@ func _jsonBadPathError(tls *libc.TLS, ctx uintptr, zPath uintptr) (r uintptr) { defer tls.Free(16) var zMsg uintptr _ = zMsg - zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25316, libc.VaList(bp+8, zPath)) + zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25371, libc.VaList(bp+8, zPath)) if ctx == uintptr(0) { return zMsg } @@ -173222,7 +173636,7 @@ func _jsonBadPathError(tls *libc.TLS, ctx uintptr, zPath uintptr) (r uintptr) { // C documentation // // /* argv[0] is a BLOB that seems likely to be a JSONB. Subsequent -// ** arguments come in parse where each pair contains a JSON path and +// ** arguments come in pairs where each pair contains a JSON path and // ** content to insert or set at that patch. Do the updates // ** and return the result. // ** @@ -173303,7 +173717,7 @@ jsonInsertIntoBlob_patherror: ; _jsonParseFree(tls, p) if rc == uint32(JSON_LOOKUP_ERROR) { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) } else { _jsonBadPathError(tls, ctx, zPath) } @@ -173315,34 +173729,54 @@ jsonInsertIntoBlob_patherror: // /* // ** If pArg is a blob that seems like a JSONB blob, then initialize // ** p to point to that JSONB and return TRUE. If pArg does not seem like -// ** a JSONB blob, then return FALSE; -// ** -// ** This routine is only called if it is already known that pArg is a -// ** blob. The only open question is whether or not the blob appears -// ** to be a JSONB blob. +// ** a JSONB blob, then return FALSE. +// ** +// ** For small BLOBs (having no more than 7 bytes of payload) a full +// ** validity check is done. So for small BLOBs this routine only returns +// ** true if the value is guaranteed to be a valid JSONB. For larger BLOBs +// ** (8 byte or more of payload) only the size of the outermost element is +// ** checked to verify that the BLOB is superficially valid JSONB. +// ** +// ** A full JSONB validation is done on smaller BLOBs because those BLOBs might +// ** also be text JSON that has been incorrectly cast into a BLOB. +// ** (See tag-20240123-a and https://sqlite.org/forum/forumpost/012136abd5) +// ** If the BLOB is 9 bytes are larger, then it is not possible for the +// ** superficial size check done here to pass if the input is really text +// ** JSON so we do not need to look deeper in that case. +// ** +// ** Why we only need to do full JSONB validation for smaller BLOBs: +// ** +// ** The first byte of valid JSON text must be one of: '{', '[', '"', ' ', '\n', +// ** '\r', '\t', '-', or a digit '0' through '9'. Of these, only a subset +// ** can also be the first byte of JSONB: '{', '[', and digits '3' +// ** through '9'. In every one of those cases, the payload size is 7 bytes +// ** or less. So if we do full JSONB validation for every BLOB where the +// ** payload is less than 7 bytes, we will never get a false positive for +// ** JSONB on an input that is really text JSON. // */ func _jsonArgIsJsonb(tls *libc.TLS, pArg uintptr, p uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) - var n, v1 Tu32 - var v2 bool + var c, v1 Tu8 + var n, v3 Tu32 + var v2, v4 bool var _ /* sz at bp+0 */ Tu32 - _, _, _ = n, v1, v2 + _, _, _, _, _, _ = c, n, v1, v2, v3, v4 *(*Tu32)(unsafe.Pointer(bp)) = uint32(0) - (*TJsonParse)(unsafe.Pointer(p)).FaBlob = Xsqlite3_value_blob(tls, pArg) - (*TJsonParse)(unsafe.Pointer(p)).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pArg)) - if (*TJsonParse)(unsafe.Pointer(p)).FnBlob == uint32(0) { - (*TJsonParse)(unsafe.Pointer(p)).FaBlob = uintptr(0) + if Xsqlite3_value_type(tls, pArg) != int32(SQLITE_BLOB) { return 0 } - if (*TJsonParse)(unsafe.Pointer(p)).FaBlob == uintptr(0) { - return 0 + (*TJsonParse)(unsafe.Pointer(p)).FaBlob = Xsqlite3_value_blob(tls, pArg) + (*TJsonParse)(unsafe.Pointer(p)).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pArg)) + if v2 = (*TJsonParse)(unsafe.Pointer(p)).FnBlob > uint32(0) && (*TJsonParse)(unsafe.Pointer(p)).FaBlob != uintptr(0); v2 { + v1 = *(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(p)).FaBlob)) + c = v1 } - if v2 = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(p)).FaBlob)))&int32(0x0f) <= int32(JSONB_OBJECT); v2 { - v1 = _jsonbPayloadSize(tls, p, uint32(0), bp) - n = v1 + if v4 = v2 && libc.Int32FromUint8(v1)&int32(0x0f) <= int32(JSONB_OBJECT); v4 { + v3 = _jsonbPayloadSize(tls, p, uint32(0), bp) + n = v3 } - if v2 && v1 > uint32(0) && *(*Tu32)(unsafe.Pointer(bp))+n == (*TJsonParse)(unsafe.Pointer(p)).FnBlob && (libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(p)).FaBlob)))&int32(0x0f) > int32(JSONB_FALSE) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0)) { + if v4 && v3 > uint32(0) && *(*Tu32)(unsafe.Pointer(bp))+n == (*TJsonParse)(unsafe.Pointer(p)).FnBlob && (libc.Int32FromUint8(c)&int32(0x0f) > int32(JSONB_FALSE) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0)) && (*(*Tu32)(unsafe.Pointer(bp)) > uint32(7) || libc.Int32FromUint8(c) != int32(0x7b) && libc.Int32FromUint8(c) != int32(0x5b) && !(libc.Int32FromUint8(_sqlite3CtypeMap[c])&libc.Int32FromInt32(0x04) != 0) || _jsonbValidityCheck(tls, p, uint32(0), (*TJsonParse)(unsafe.Pointer(p)).FnBlob, uint32(1)) == uint32(0)) { return int32(1) } (*TJsonParse)(unsafe.Pointer(p)).FaBlob = uintptr(0) @@ -173425,7 +173859,7 @@ rebuild_from_cache: ** JSON functions were suppose to work. From the beginning, blob was ** reserved for expansion and a blob value should have raised an error. ** But it did not, due to a bug. And many applications came to depend - ** upon this buggy behavior, espeically when using the CLI and reading + ** upon this buggy behavior, especially when using the CLI and reading ** JSON text using readfile(), which returns a blob. For this reason ** we will continue to support the bug moving forward. ** See for example https://sqlite.org/forum/forumpost/012136abd5292b8d @@ -173485,7 +173919,7 @@ json_pfa_malformed: return p } else { _jsonParseFree(tls, p) - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) return uintptr(0) } goto json_pfa_oom @@ -173620,7 +174054,7 @@ func _jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) if int32(*(*int8)(unsafe.Pointer(zPath))) == int32('$') { v1 = zPath + uintptr(1) } else { - v1 = __ccgo_ts + 25334 + v1 = __ccgo_ts + 25389 } i = _jsonLookupStep(tls, p, uint32(0), v1, uint32(0)) if i >= uint32(JSON_LOOKUP_PATHERROR) { @@ -173630,7 +174064,7 @@ func _jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) if i == uint32(JSON_LOOKUP_PATHERROR) { _jsonBadPathError(tls, ctx, zPath) } else { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) } } eErr = uint8(1) @@ -173740,23 +174174,23 @@ func _jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { */ _jsonStringInit(tls, bp, ctx) if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) == int32(SQLITE_INTEGER) { - _jsonAppendRawNZ(tls, bp, __ccgo_ts+25336, uint32(1)) + _jsonAppendRawNZ(tls, bp, __ccgo_ts+25391, uint32(1)) if int32(*(*int8)(unsafe.Pointer(zPath))) == int32('-') { - _jsonAppendRawNZ(tls, bp, __ccgo_ts+25338, uint32(1)) + _jsonAppendRawNZ(tls, bp, __ccgo_ts+25393, uint32(1)) } _jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath)) - _jsonAppendRawNZ(tls, bp, __ccgo_ts+5228, uint32(2)) + _jsonAppendRawNZ(tls, bp, __ccgo_ts+5254, uint32(2)) } else { if _jsonAllAlphanum(tls, zPath, nPath) != 0 { - _jsonAppendRawNZ(tls, bp, __ccgo_ts+1678, uint32(1)) + _jsonAppendRawNZ(tls, bp, __ccgo_ts+1704, uint32(1)) _jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath)) } else { if int32(*(*int8)(unsafe.Pointer(zPath))) == int32('[') && nPath >= int32(3) && int32(*(*int8)(unsafe.Pointer(zPath + uintptr(nPath-int32(1))))) == int32(']') { _jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath)) } else { - _jsonAppendRawNZ(tls, bp, __ccgo_ts+25340, uint32(2)) + _jsonAppendRawNZ(tls, bp, __ccgo_ts+25395, uint32(2)) _jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath)) - _jsonAppendRawNZ(tls, bp, __ccgo_ts+25343, uint32(1)) + _jsonAppendRawNZ(tls, bp, __ccgo_ts+25398, uint32(1)) } } } @@ -173796,7 +174230,7 @@ func _jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { } } else { if j == uint32(JSON_LOOKUP_ERROR) { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) goto json_extract_error } else { _jsonBadPathError(tls, ctx, zPath) @@ -174064,7 +174498,7 @@ func _jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if rc == int32(JSON_MERGE_OOM) { Xsqlite3_result_error_nomem(tls, ctx) } else { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) } } _jsonParseFree(tls, pPatch) @@ -174088,7 +174522,7 @@ func _jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { var _ /* jx at bp+0 */ TJsonString _, _, _ = i, n, z if argc&int32(1) != 0 { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25345, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25400, -int32(1)) return } _jsonStringInit(tls, bp, ctx) @@ -174099,7 +174533,7 @@ func _jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { break } if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != int32(SQLITE_TEXT) { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25396, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25451, -int32(1)) _jsonStringReset(tls, bp) return } @@ -174171,7 +174605,7 @@ func _jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if rc == uint32(JSON_LOOKUP_PATHERROR) { _jsonBadPathError(tls, ctx, zPath) } else { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) } } goto json_remove_done @@ -174208,7 +174642,7 @@ func _jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { return } if argc&int32(1) == 0 { - _jsonWrongNumArgs(tls, ctx, __ccgo_ts+15953) + _jsonWrongNumArgs(tls, ctx, __ccgo_ts+16025) return } _jsonInsertIntoBlob(tls, ctx, argc, argv, int32(JEDIT_REPL)) @@ -174239,9 +174673,9 @@ func _jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { } if argc&int32(1) == 0 { if bIsSet != 0 { - v1 = __ccgo_ts + 25430 + v1 = __ccgo_ts + 25485 } else { - v1 = __ccgo_ts + 25434 + v1 = __ccgo_ts + 25489 } _jsonWrongNumArgs(tls, ctx, v1) return @@ -174289,7 +174723,7 @@ func _jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { if i == uint32(JSON_LOOKUP_PATHERROR) { _jsonBadPathError(tls, ctx, zPath) } else { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25171, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25226, -int32(1)) } } goto json_type_done @@ -174336,7 +174770,7 @@ func _jsonPrettyFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { (*(*TJsonPretty)(unsafe.Pointer(bp + 136))).FzIndent = v1 } if v2 || v1 == uintptr(0) { - (*(*TJsonPretty)(unsafe.Pointer(bp + 136))).FzIndent = __ccgo_ts + 25441 + (*(*TJsonPretty)(unsafe.Pointer(bp + 136))).FzIndent = __ccgo_ts + 25496 (*(*TJsonPretty)(unsafe.Pointer(bp + 136))).FszIndent = uint32(4) } else { (*(*TJsonPretty)(unsafe.Pointer(bp + 136))).FszIndent = uint32(libc.Xstrlen(tls, (*(*TJsonPretty)(unsafe.Pointer(bp + 136))).FzIndent)) @@ -174410,17 +174844,16 @@ func _jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { defer tls.Free(144) var f Ti64 var flags, res Tu8 - var iErr Tu32 var p uintptr - var _ /* px at bp+0 */ TJsonParse var _ /* px at bp+72 */ TJsonParse - _, _, _, _, _ = f, flags, iErr, p, res /* The parse */ + var _ /* py at bp+0 */ TJsonParse + _, _, _, _ = f, flags, p, res /* The parse */ flags = uint8(1) res = uint8(0) if argc == int32(2) { f = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if f < int64(1) || f > int64(15) { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+25446, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+25501, -int32(1)) return } flags = libc.Uint8FromInt64(f & int64(0x0f)) @@ -174429,18 +174862,17 @@ func _jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { case int32(SQLITE_NULL): return case int32(SQLITE_BLOB): - if _jsonFuncArgMightBeBinary(tls, *(*uintptr)(unsafe.Pointer(argv))) != 0 { + libc.Xmemset(tls, bp, 0, uint64(72)) + if _jsonArgIsJsonb(tls, *(*uintptr)(unsafe.Pointer(argv)), bp) != 0 { if libc.Int32FromUint8(flags)&int32(0x04) != 0 { /* Superficial checking only - accomplished by the - ** jsonFuncArgMightBeBinary() call above. */ + ** jsonArgIsJsonb() call above. */ res = uint8(1) } else { if libc.Int32FromUint8(flags)&int32(0x08) != 0 { - libc.Xmemset(tls, bp, 0, uint64(72)) - (*(*TJsonParse)(unsafe.Pointer(bp))).FaBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) - (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) - iErr = _jsonbValidityCheck(tls, bp, uint32(0), (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob, uint32(1)) - res = libc.BoolUint8(iErr == uint32(0)) + /* Strict checking. Check by translating BLOB->TEXT->BLOB. If + ** no errors occur, call that a "strict check". */ + res = libc.BoolUint8(uint32(0) == _jsonbValidityCheck(tls, bp, uint32(0), (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob, uint32(1))) } } break @@ -174502,9 +174934,7 @@ func _jsonErrorFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { _ = argc libc.Xmemset(tls, bp, 0, uint64(72)) (*(*TJsonParse)(unsafe.Pointer(bp))).Fdb = Xsqlite3_context_db_handle(tls, ctx) - if _jsonFuncArgMightBeBinary(tls, *(*uintptr)(unsafe.Pointer(argv))) != 0 { - (*(*TJsonParse)(unsafe.Pointer(bp))).FaBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) - (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) + if _jsonArgIsJsonb(tls, *(*uintptr)(unsafe.Pointer(argv)), bp) != 0 { iErrPos = libc.Int64FromUint32(_jsonbValidityCheck(tls, bp, uint32(0), (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob, uint32(1))) } else { (*(*TJsonParse)(unsafe.Pointer(bp))).FzJson = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -174611,7 +175041,7 @@ func _jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { } } } else { - Xsqlite3_result_text(tls, ctx, __ccgo_ts+25503, int32(2), libc.UintptrFromInt32(0)) + Xsqlite3_result_text(tls, ctx, __ccgo_ts+25558, int32(2), libc.UintptrFromInt32(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -174703,20 +175133,22 @@ func _jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(136)) if pStr != 0 { + z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) + n = libc.Uint32FromInt32(_sqlite3Strlen30(tls, z)) if (*TJsonString)(unsafe.Pointer(pStr)).FzBuf == uintptr(0) { _jsonStringInit(tls, pStr, ctx) _jsonAppendChar(tls, pStr, int8('{')) } else { - if (*TJsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) { + if (*TJsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) && z != uintptr(0) { _jsonAppendChar(tls, pStr, int8(',')) } } (*TJsonString)(unsafe.Pointer(pStr)).FpCtx = ctx - z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) - n = libc.Uint32FromInt32(_sqlite3Strlen30(tls, z)) - _jsonAppendString(tls, pStr, z, n) - _jsonAppendChar(tls, pStr, int8(':')) - _jsonAppendSqlValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + if z != uintptr(0) { + _jsonAppendString(tls, pStr, z, n) + _jsonAppendChar(tls, pStr, int8(':')) + _jsonAppendSqlValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + 1*8))) + } } } @@ -174760,7 +175192,7 @@ func _jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { } } } else { - Xsqlite3_result_text(tls, ctx, __ccgo_ts+25506, int32(2), libc.UintptrFromInt32(0)) + Xsqlite3_result_text(tls, ctx, __ccgo_ts+25561, int32(2), libc.UintptrFromInt32(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -174863,7 +175295,7 @@ func _jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argv _ = argc _ = pAux - rc = Xsqlite3_declare_vtab(tls, db, __ccgo_ts+25509) + rc = Xsqlite3_declare_vtab(tls, db, __ccgo_ts+25564) if rc == SQLITE_OK { pNew = _sqlite3DbMallocZero(tls, db, uint64(32)) *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew @@ -174997,7 +175429,7 @@ func _jsonAppendPathName(tls *libc.TLS, p uintptr) { var _ /* sz at bp+0 */ Tu32 _, _, _, _, _ = i, k, n, needQuote, z if libc.Int32FromUint8((*TJsonEachCursor)(unsafe.Pointer(p)).FeType) == int32(JSONB_ARRAY) { - _jsonPrintf(tls, int32(30), p+56, __ccgo_ts+25592, libc.VaList(bp+16, (*(*TJsonParent)(unsafe.Pointer((*TJsonEachCursor)(unsafe.Pointer(p)).FaParent + uintptr((*TJsonEachCursor)(unsafe.Pointer(p)).FnParent-uint32(1))*24))).FiKey)) + _jsonPrintf(tls, int32(30), p+56, __ccgo_ts+25647, libc.VaList(bp+16, (*(*TJsonParent)(unsafe.Pointer((*TJsonEachCursor)(unsafe.Pointer(p)).FaParent + uintptr((*TJsonEachCursor)(unsafe.Pointer(p)).FnParent-uint32(1))*24))).FiKey)) } else { *(*Tu32)(unsafe.Pointer(bp)) = uint32(0) needQuote = 0 @@ -175023,9 +175455,9 @@ func _jsonAppendPathName(tls *libc.TLS, p uintptr) { } } if needQuote != 0 { - _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(4)), p+56, __ccgo_ts+25599, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z)) + _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(4)), p+56, __ccgo_ts+25654, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z)) } else { - _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(2)), p+56, __ccgo_ts+25607, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z)) + _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(2)), p+56, __ccgo_ts+25662, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z)) } } } @@ -175336,9 +175768,8 @@ func _jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, a libc.Xmemset(tls, p+192, 0, uint64(72)) (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FnJPRef = uint32(1) (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.Fdb = (*TJsonEachCursor)(unsafe.Pointer(p)).Fdb - if _jsonFuncArgMightBeBinary(tls, *(*uintptr)(unsafe.Pointer(argv))) != 0 { - (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) - (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FaBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) + if _jsonArgIsJsonb(tls, *(*uintptr)(unsafe.Pointer(argv)), p+192) != 0 { + /* We have JSONB */ } else { (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FzJson = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FnJson = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -175411,7 +175842,7 @@ func _jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, a i = v5 (*TJsonEachCursor)(unsafe.Pointer(p)).FeType = uint8(0) (*TJsonEachCursor)(unsafe.Pointer(p)).FnRoot = uint32(1) - _jsonAppendRaw(tls, p+56, __ccgo_ts+25613, uint32(1)) + _jsonAppendRaw(tls, p+56, __ccgo_ts+25668, uint32(1)) } (*TJsonEachCursor)(unsafe.Pointer(p)).FnParent = uint32(0) n = _jsonbPayloadSize(tls, p+192, i, bp) @@ -175435,7 +175866,7 @@ func _jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, a json_each_malformed_input: ; Xsqlite3_free(tls, (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25171, 0) + (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25226, 0) _jsonEachCursorReset(tls, p) if (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { v6 = int32(SQLITE_ERROR) @@ -175496,186 +175927,186 @@ var _aJsonFunc = [34]TFuncDef{ 0: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25615, + FzName: __ccgo_ts + 25670, }, 1: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25620, + FzName: __ccgo_ts + 25675, }, 2: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25626, + FzName: __ccgo_ts + 25681, }, 3: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25637, + FzName: __ccgo_ts + 25692, }, 4: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25649, + FzName: __ccgo_ts + 25704, }, 5: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25649, + FzName: __ccgo_ts + 25704, }, 6: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25667, + FzName: __ccgo_ts + 25722, }, 7: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25687, + FzName: __ccgo_ts + 25742, }, 8: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25700, + FzName: __ccgo_ts + 25755, }, 9: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(JSON_JSON) | libc.Int32FromInt32(0)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25714, + FzName: __ccgo_ts + 25769, }, 10: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(JSON_SQL) | libc.Int32FromInt32(0)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25717, + FzName: __ccgo_ts + 25772, }, 11: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25721, + FzName: __ccgo_ts + 25776, }, 12: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25733, + FzName: __ccgo_ts + 25788, }, 13: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25746, + FzName: __ccgo_ts + 25801, }, 14: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25758, + FzName: __ccgo_ts + 25813, }, 15: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25771, + FzName: __ccgo_ts + 25826, }, 16: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25782, + FzName: __ccgo_ts + 25837, }, 17: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25794, + FzName: __ccgo_ts + 25849, }, 18: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25794, + FzName: __ccgo_ts + 25849, }, 19: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25806, + FzName: __ccgo_ts + 25861, }, 20: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25817, + FzName: __ccgo_ts + 25872, }, 21: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25829, + FzName: __ccgo_ts + 25884, }, 22: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25842, + FzName: __ccgo_ts + 25897, }, 23: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25855, + FzName: __ccgo_ts + 25910, }, 24: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(JSON_ISSET) | libc.Int32FromInt32(0)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25869, + FzName: __ccgo_ts + 25924, }, 25: { FnArg: int16(-int32(1)), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), FpUserData: uintptr(int64(libc.Int32FromInt32(JSON_ISSET) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25878, + FzName: __ccgo_ts + 25933, }, 26: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25888, + FzName: __ccgo_ts + 25943, }, 27: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25888, + FzName: __ccgo_ts + 25943, }, 28: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25898, + FzName: __ccgo_ts + 25953, }, 29: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)), - FzName: __ccgo_ts + 25898, + FzName: __ccgo_ts + 25953, }, 30: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)), - FzName: __ccgo_ts + 25909, + FzName: __ccgo_ts + 25964, }, 31: { FnArg: int16(1), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)), FpUserData: uintptr(int64(libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25926, + FzName: __ccgo_ts + 25981, }, 32: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)), - FzName: __ccgo_ts + 25944, + FzName: __ccgo_ts + 25999, }, 33: { FnArg: int16(2), FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)), FpUserData: uintptr(int64(libc.Int32FromInt32(JSON_BLOB))), - FzName: __ccgo_ts + 25962, + FzName: __ccgo_ts + 26017, }, } @@ -175758,17 +176189,19 @@ var _aMod = [2]struct { FpModule uintptr }{ 0: { - FzName: __ccgo_ts + 25981, + FzName: __ccgo_ts + 26036, FpModule: uintptr(unsafe.Pointer(&_jsonEachModule)), }, 1: { - FzName: __ccgo_ts + 25991, + FzName: __ccgo_ts + 26046, FpModule: uintptr(unsafe.Pointer(&_jsonTreeModule)), }, } /* In the SQLite core */ +/* #include <stddef.h> */ + /* ** If building separately, we will need some setup that is normally ** found in sqliteInt.h @@ -175876,7 +176309,6 @@ type TRtreeMatchArg = struct { Fcb TRtreeGeomCallback FnParam int32 FapSqlParam uintptr - FaParam [1]TRtreeDValue } type RtreeMatchArg = TRtreeMatchArg @@ -176159,11 +176591,12 @@ type TRtreeMatchArg1 = struct { Fcb TRtreeGeomCallback FnParam int32 FapSqlParam uintptr - FaParam [1]TRtreeDValue } type RtreeMatchArg1 = TRtreeMatchArg1 +/* Size of an RtreeMatchArg object with N parameters */ + /* What version of GCC is being used. 0 means GCC is not being used . ** Note that the GCC_VERSION macro will also be set correctly when using ** clang, since clang works hard to be gcc compatible. So the gcc @@ -176409,7 +176842,7 @@ func _nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode Ti64, pParent uintptr, pp } } if (*TRtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - rc = Xsqlite3_blob_open(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, __ccgo_ts+26001, iNode, 0, pRtree+112) + rc = Xsqlite3_blob_open(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, __ccgo_ts+26056, iNode, 0, pRtree+112) } if rc != 0 { *(*uintptr)(unsafe.Pointer(ppNode)) = uintptr(0) @@ -176714,7 +177147,7 @@ func _rtreeDestroy(tls *libc.TLS, pVtab uintptr) (r int32) { var rc int32 _, _, _ = pRtree, rc, zCreate pRtree = pVtab - zCreate = Xsqlite3_mprintf(tls, __ccgo_ts+26006, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) + zCreate = Xsqlite3_mprintf(tls, __ccgo_ts+26061, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) if !(zCreate != 0) { rc = int32(SQLITE_NOMEM) } else { @@ -177636,7 +178069,7 @@ func _findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid Ti64, ppLeaf uintptr, p func _deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) (r int32) { var pBlob, pInfo, pSrc uintptr _, _, _ = pBlob, pInfo, pSrc /* Callback information */ - pSrc = Xsqlite3_value_pointer(tls, pValue, __ccgo_ts+26088) + pSrc = Xsqlite3_value_pointer(tls, pValue, __ccgo_ts+26143) if pSrc == uintptr(0) { return int32(SQLITE_ERROR) } @@ -177953,7 +178386,7 @@ func _rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) { // C documentation // // /* -// ** Return the N-dimensional volumn of the cell stored in *p. +// ** Return the N-dimensional volume of the cell stored in *p. // */ func _cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) (r TRtreeDValue) { var area TRtreeDValue @@ -179171,7 +179604,7 @@ func _rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) (r int32) var _ /* pStmt at bp+0 */ uintptr _, _, _, _, _, _ = rc, zCol, zCol1, zCol2, zSql, v1 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26102, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26157, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -int32(1), bp, uintptr(0)) } else { @@ -179181,11 +179614,11 @@ func _rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) (r int32) if rc == SQLITE_OK { if iCol == 0 { zCol = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) - (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26122, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26177, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { zCol1 = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), iCol) zCol2 = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), iCol+int32(1)) - (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26154, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26209, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -179399,7 +179832,7 @@ func _rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) (r int32) { _, _, _ = pRtree, rc, zSql pRtree = pVtab rc = int32(SQLITE_NOMEM) - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26191, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26246, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { _nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -179453,9 +179886,9 @@ func _rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) (r int32) { var v2 int64 var _ /* p at bp+0 */ uintptr _, _, _, _, _, _ = nRow, rc, zFmt, zSql, v1, v2 - zFmt = __ccgo_ts + 26336 + zFmt = __ccgo_ts + 26391 nRow = int64(RTREE_MIN_ROWEST) - rc = Xsqlite3_table_column_metadata(tls, db, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, __ccgo_ts+11771, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_table_column_metadata(tls, db, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, __ccgo_ts+11796, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*TRtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == int32(SQLITE_ERROR) { @@ -179513,9 +179946,9 @@ func _rtreeShadowName(tls *libc.TLS, zName uintptr) (r int32) { } var _azName1 = [3]uintptr{ - 0: __ccgo_ts + 26392, - 1: __ccgo_ts + 5567, - 2: __ccgo_ts + 16848, + 0: __ccgo_ts + 26447, + 1: __ccgo_ts + 5593, + 2: __ccgo_ts + 16920, } var _rtreeModule = Tsqlite3_module{ @@ -179559,21 +179992,21 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref (*TRtree)(unsafe.Pointer(pRtree)).Fdb = db if isCreate != 0 { p = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, p, __ccgo_ts+26806, libc.VaList(bp+8, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, __ccgo_ts+26861, libc.VaList(bp+8, zDb, zPrefix)) ii = 0 for { if !(ii < libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAux)) { break } - Xsqlite3_str_appendf(tls, p, __ccgo_ts+26868, libc.VaList(bp+8, ii)) + Xsqlite3_str_appendf(tls, p, __ccgo_ts+26923, libc.VaList(bp+8, ii)) goto _1 _1: ; ii++ } - Xsqlite3_str_appendf(tls, p, __ccgo_ts+26873, libc.VaList(bp+8, zDb, zPrefix)) - Xsqlite3_str_appendf(tls, p, __ccgo_ts+26937, libc.VaList(bp+8, zDb, zPrefix)) - Xsqlite3_str_appendf(tls, p, __ccgo_ts+27007, libc.VaList(bp+8, zDb, zPrefix, (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize)) + Xsqlite3_str_appendf(tls, p, __ccgo_ts+26928, libc.VaList(bp+8, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, __ccgo_ts+26992, libc.VaList(bp+8, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, __ccgo_ts+27062, libc.VaList(bp+8, zDb, zPrefix, (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { return int32(SQLITE_NOMEM) @@ -179603,7 +180036,7 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref } else { /* An UPSERT is very slightly slower than REPLACE, but it is needed ** if there are auxiliary columns */ - zFormat = __ccgo_ts + 27056 + zFormat = __ccgo_ts + 27111 } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+8, zDb, zPrefix)) if zSql != 0 { @@ -179618,31 +180051,31 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref i++ } if (*TRtree)(unsafe.Pointer(pRtree)).FnAux != 0 && rc != int32(SQLITE_NOMEM) { - (*TRtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, __ccgo_ts+27164, libc.VaList(bp+8, zDb, zPrefix)) + (*TRtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, __ccgo_ts+27219, libc.VaList(bp+8, zDb, zPrefix)) if (*TRtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { p1 = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27209, libc.VaList(bp+8, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27264, libc.VaList(bp+8, zDb, zPrefix)) ii1 = 0 for { if !(ii1 < libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAux)) { break } if ii1 != 0 { - Xsqlite3_str_append(tls, p1, __ccgo_ts+13279, int32(1)) + Xsqlite3_str_append(tls, p1, __ccgo_ts+13304, int32(1)) } if ii1 < libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27236, libc.VaList(bp+8, ii1, ii1+int32(2), ii1)) + Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27291, libc.VaList(bp+8, ii1, ii1+int32(2), ii1)) } else { - Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27258, libc.VaList(bp+8, ii1, ii1+int32(2))) + Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27313, libc.VaList(bp+8, ii1, ii1+int32(2))) } goto _3 _3: ; ii1++ } - Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27266, 0) + Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27321, 0) zSql1 = Xsqlite3_str_finish(tls, p1) if zSql1 == uintptr(0) { rc = int32(SQLITE_NOMEM) @@ -179656,14 +180089,14 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref } var _azSql = [8]uintptr{ - 0: __ccgo_ts + 26397, - 1: __ccgo_ts + 26450, - 2: __ccgo_ts + 26495, - 3: __ccgo_ts + 26547, - 4: __ccgo_ts + 26601, - 5: __ccgo_ts + 26646, - 6: __ccgo_ts + 26704, - 7: __ccgo_ts + 26759, + 0: __ccgo_ts + 26452, + 1: __ccgo_ts + 26505, + 2: __ccgo_ts + 26550, + 3: __ccgo_ts + 26602, + 4: __ccgo_ts + 26656, + 5: __ccgo_ts + 26701, + 6: __ccgo_ts + 26759, + 7: __ccgo_ts + 26814, } // C documentation @@ -179721,7 +180154,7 @@ func _getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzE _, _ = rc, zSql if isCreate != 0 { *(*int32)(unsafe.Pointer(bp)) = 0 - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27282, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27337, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb)) rc = _getIntFromStmt(tls, db, zSql, bp) if rc == SQLITE_OK { (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp)) - int32(64) @@ -179729,17 +180162,17 @@ func _getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzE (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize = int32(4) + libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*int32(RTREE_MAXCELLS) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) } } else { - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27302, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27357, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) rc = _getIntFromStmt(tls, db, zSql, pRtree+32) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) } else { if (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize < libc.Int32FromInt32(512)-libc.Int32FromInt32(64) { rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8) - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+27359, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+27414, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName)) } } } @@ -179787,14 +180220,14 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt eCoordType = v1 ii = int32(4) aErrMsg = [5]uintptr{ - 1: __ccgo_ts + 27394, - 2: __ccgo_ts + 27437, - 3: __ccgo_ts + 27472, - 4: __ccgo_ts + 27508, + 1: __ccgo_ts + 27449, + 2: __ccgo_ts + 27492, + 3: __ccgo_ts + 27527, + 4: __ccgo_ts + 27563, } /* Aux columns counted by a u8 */ if argc < int32(6) || argc > libc.Int32FromInt32(RTREE_MAX_AUX_COLUMN)+libc.Int32FromInt32(3) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, aErrMsg[int32(2)+libc.BoolInt32(argc >= int32(6))])) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, aErrMsg[int32(2)+libc.BoolInt32(argc >= int32(6))])) return int32(SQLITE_ERROR) } Xsqlite3_vtab_config(tls, db, int32(SQLITE_VTAB_CONSTRAINT_SUPPORT), libc.VaList(bp+8, int32(1))) @@ -179816,13 +180249,13 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.Uint64FromInt32(nDb)) libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), libc.Uint64FromInt32(nName)) libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), libc.Uint64FromInt32(nName)) - libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27545, uint64(6)) + libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27600, uint64(6)) /* Create/Connect to the underlying relational database schema. If ** that is successful, call sqlite3_declare_vtab() to configure ** the r-tree table schema. */ pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27551, libc.VaList(bp+8, _rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27606, libc.VaList(bp+8, _rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = int32(4) for { if !(ii < argc) { @@ -179831,7 +180264,7 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt zArg = *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)) if int32(*(*int8)(unsafe.Pointer(zArg))) == int32('+') { (*TRtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27575, libc.VaList(bp+8, _rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27630, libc.VaList(bp+8, _rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) } else { if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAux) > 0 { break @@ -179845,19 +180278,19 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt ; ii++ } - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27602, 0) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27657, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !(zSql != 0) { rc = int32(SQLITE_NOMEM) } else { if ii < argc { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, aErrMsg[int32(4)])) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, aErrMsg[int32(4)])) rc = int32(SQLITE_ERROR) } else { v3 = Xsqlite3_declare_vtab(tls, db, zSql) rc = v3 if SQLITE_OK != v3 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } } @@ -179880,7 +180313,7 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt } } if iErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, aErrMsg[iErr])) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, aErrMsg[iErr])) goto rtreeInit_fail } (*TRtree)(unsafe.Pointer(pRtree)).FnBytesPerCell = libc.Uint8FromInt32(int32(8) + libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnDim2)*int32(4)) @@ -179891,7 +180324,7 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt } rc = _rtreeSqlInit(tls, pRtree, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), isCreate) if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail } *(*uintptr)(unsafe.Pointer(ppVtab)) = pRtree @@ -179907,8 +180340,8 @@ rtreeInit_fail: } var _azFormat = [2]uintptr{ - 0: __ccgo_ts + 27581, - 1: __ccgo_ts + 27592, + 0: __ccgo_ts + 27636, + 1: __ccgo_ts + 27647, } // C documentation @@ -179966,21 +180399,21 @@ func _rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { } _nodeGetCell(tls, bp+40, bp, ii, bp+1008) if ii > 0 { - Xsqlite3_str_append(tls, pOut, __ccgo_ts+11391, int32(1)) + Xsqlite3_str_append(tls, pOut, __ccgo_ts+11416, int32(1)) } - Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27605, libc.VaList(bp+1064, (*(*TRtreeCell)(unsafe.Pointer(bp + 1008))).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27660, libc.VaList(bp+1064, (*(*TRtreeCell)(unsafe.Pointer(bp + 1008))).FiRowid)) jj = 0 for { if !(jj < libc.Int32FromUint8((*(*TRtree)(unsafe.Pointer(bp + 40))).FnDim2)) { break } - Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27611, libc.VaList(bp+1064, float64(*(*TRtreeValue)(unsafe.Pointer(bp + 1008 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27666, libc.VaList(bp+1064, float64(*(*TRtreeValue)(unsafe.Pointer(bp + 1008 + 8 + uintptr(jj)*4))))) goto _2 _2: ; jj++ } - Xsqlite3_str_append(tls, pOut, __ccgo_ts+27615, int32(1)) + Xsqlite3_str_append(tls, pOut, __ccgo_ts+27670, int32(1)) goto _1 _1: ; @@ -180007,7 +180440,7 @@ func _rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { _ = zBlob _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != int32(SQLITE_BLOB) || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < int32(2) { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+27617, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+27672, -int32(1)) } else { zBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -180110,7 +180543,7 @@ func _rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // /* // ** The second and subsequent arguments to this function are a printf() // ** style format string and arguments. This function formats the string and -// ** appends it to the report being accumuated in pCheck. +// ** appends it to the report being accumulated in pCheck. // */ func _rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { bp := tls.Alloc(32) @@ -180125,11 +180558,11 @@ func _rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintpt (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc = int32(SQLITE_NOMEM) } else { if (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - v1 = __ccgo_ts + 4270 + v1 = __ccgo_ts + 4296 } else { v1 = __ccgo_ts + 1665 } - (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, __ccgo_ts+27650, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport, v1, z)) + (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, __ccgo_ts+27705, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport, v1, z)) if (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc = int32(SQLITE_NOMEM) } @@ -180163,7 +180596,7 @@ func _rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode Ti64, pnNode uintpt _, _, _ = nNode, pNode, pRet pRet = uintptr(0) /* Return value */ if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { - (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+27657, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) + (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+27712, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { Xsqlite3_bind_int64(tls, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode, int32(1), iNode) @@ -180180,7 +180613,7 @@ func _rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode Ti64, pnNode uintpt } _rtreeCheckReset(tls, pCheck, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27702, libc.VaList(bp+8, iNode)) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27757, libc.VaList(bp+8, iNode)) } } return pRet @@ -180209,8 +180642,8 @@ func _rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey Ti64, i var rc int32 _, _, _, _, _, _ = azSql, ii, pStmt, rc, v1, v2 azSql = [2]uintptr{ - 0: __ccgo_ts + 27734, - 1: __ccgo_ts + 27788, + 0: __ccgo_ts + 27789, + 1: __ccgo_ts + 27843, } if *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(pCheck + 40 + uintptr(bLeaf)*8)) = _rtreeCheckPrepare(tls, pCheck, azSql[bLeaf], libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) @@ -180223,21 +180656,21 @@ func _rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey Ti64, i rc = Xsqlite3_step(tls, pStmt) if rc == int32(SQLITE_DONE) { if bLeaf != 0 { - v1 = __ccgo_ts + 27836 + v1 = __ccgo_ts + 27891 } else { - v1 = __ccgo_ts + 27844 + v1 = __ccgo_ts + 27899 } - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27853, libc.VaList(bp+8, iKey, iVal, v1)) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27908, libc.VaList(bp+8, iKey, iVal, v1)) } else { if rc == int32(SQLITE_ROW) { ii = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { if bLeaf != 0 { - v2 = __ccgo_ts + 27836 + v2 = __ccgo_ts + 27891 } else { - v2 = __ccgo_ts + 27844 + v2 = __ccgo_ts + 27899 } - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27898, libc.VaList(bp+8, iKey, ii, v2, iKey, iVal)) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27953, libc.VaList(bp+8, iKey, ii, v2, iKey, iVal)) } } } @@ -180282,7 +180715,7 @@ func _rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode Ti64, iCell int32 v2 = libc.BoolInt32(*(*TRtreeValue)(unsafe.Pointer(bp)) > *(*TRtreeValue)(unsafe.Pointer(bp + 4))) } if v2 != 0 { - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27956, libc.VaList(bp+24, i, iCell, iNode)) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28011, libc.VaList(bp+24, i, iCell, iNode)) } if pParent != 0 { _readCoord(tls, pParent+uintptr(libc.Int32FromInt32(4)*libc.Int32FromInt32(2)*i), bp+8) @@ -180300,7 +180733,7 @@ func _rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode Ti64, iCell int32 } } if v5 || v4 != 0 { - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28004, libc.VaList(bp+24, i, iCell, iNode)) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28059, libc.VaList(bp+24, i, iCell, iNode)) } } goto _1 @@ -180333,19 +180766,19 @@ func _rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintpt aNode = _rtreeCheckGetNode(tls, pCheck, iNode, bp) if aNode != 0 { if *(*int32)(unsafe.Pointer(bp)) < int32(4) { - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28071, libc.VaList(bp+16, iNode, *(*int32)(unsafe.Pointer(bp)))) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28126, libc.VaList(bp+16, iNode, *(*int32)(unsafe.Pointer(bp)))) } else { /* Used to iterate through cells */ if aParent == uintptr(0) { iDepth = _readInt16(tls, aNode) if iDepth > int32(RTREE_MAX_DEPTH) { - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28105, libc.VaList(bp+16, iDepth)) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28160, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } } nCell = _readInt16(tls, aNode+2) if int32(4)+nCell*(int32(8)+(*TRtreeCheck)(unsafe.Pointer(pCheck)).FnDim*int32(2)*int32(4)) > *(*int32)(unsafe.Pointer(bp)) { - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28135, libc.VaList(bp+16, iNode, nCell, *(*int32)(unsafe.Pointer(bp)))) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28190, libc.VaList(bp+16, iNode, nCell, *(*int32)(unsafe.Pointer(bp)))) } else { i = 0 for { @@ -180390,12 +180823,12 @@ func _rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect Ti64) var pCount uintptr _, _ = nActual, pCount if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { - pCount = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+28190, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) + pCount = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+28245, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == int32(SQLITE_ROW) { nActual = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { - _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28221, libc.VaList(bp+8, zTbl, nExpect, nActual)) + _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28276, libc.VaList(bp+8, zTbl, nExpect, nActual)) } } (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -180424,7 +180857,7 @@ func _rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRe (*(*TRtreeCheck)(unsafe.Pointer(bp))).FzDb = zDb (*(*TRtreeCheck)(unsafe.Pointer(bp))).FzTab = zTab /* Find the number of auxiliary columns */ - pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+28288, libc.VaList(bp+96, zDb, zTab)) + pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+28343, libc.VaList(bp+96, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - int32(2) Xsqlite3_finalize(tls, pStmt) @@ -180434,11 +180867,11 @@ func _rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRe } } /* Find number of dimensions in the rtree table. */ - pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+26102, libc.VaList(bp+96, zDb, zTab)) + pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+26157, libc.VaList(bp+96, zDb, zTab)) if pStmt != 0 { (*(*TRtreeCheck)(unsafe.Pointer(bp))).FnDim = (Xsqlite3_column_count(tls, pStmt) - int32(1) - nAux) / int32(2) if (*(*TRtreeCheck)(unsafe.Pointer(bp))).FnDim < int32(1) { - _rtreeCheckAppendMsg(tls, bp, __ccgo_ts+28316, 0) + _rtreeCheckAppendMsg(tls, bp, __ccgo_ts+28371, 0) } else { if int32(SQLITE_ROW) == Xsqlite3_step(tls, pStmt) { (*(*TRtreeCheck)(unsafe.Pointer(bp))).FbInt = libc.BoolInt32(Xsqlite3_column_type(tls, pStmt, int32(1)) == int32(SQLITE_INTEGER)) @@ -180454,8 +180887,8 @@ func _rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRe if (*(*TRtreeCheck)(unsafe.Pointer(bp))).Frc == SQLITE_OK { _rtreeCheckNode(tls, bp, 0, uintptr(0), int64(1)) } - _rtreeCheckCount(tls, bp, __ccgo_ts+28347, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnLeaf)) - _rtreeCheckCount(tls, bp, __ccgo_ts+28354, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnNonLeaf)) + _rtreeCheckCount(tls, bp, __ccgo_ts+28402, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnLeaf)) + _rtreeCheckCount(tls, bp, __ccgo_ts+28409, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnNonLeaf)) } /* Finalize SQL statements used by the integrity-check */ Xsqlite3_finalize(tls, (*(*TRtreeCheck)(unsafe.Pointer(bp))).FpGetNode) @@ -180482,7 +180915,7 @@ func _rtreeIntegrity(tls *libc.TLS, pVtab uintptr, zSchema uintptr, zName uintpt _ = isQuick rc = _rtreeCheckTable(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, pzErr) if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(pzErr)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+28362, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(pzErr)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+28417, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(pzErr)))) if *(*uintptr)(unsafe.Pointer(pzErr)) == uintptr(0) { rc = int32(SQLITE_NOMEM) } @@ -180533,13 +180966,13 @@ func _rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { var _ /* zReport at bp+0 */ uintptr _, _, _, _ = rc, zDb, zTab, v1 if nArg != int32(1) && nArg != int32(2) { - Xsqlite3_result_error(tls, ctx, __ccgo_ts+28381, -int32(1)) + Xsqlite3_result_error(tls, ctx, __ccgo_ts+28436, -int32(1)) } else { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) zDb = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg))) if nArg == int32(1) { zTab = zDb - zDb = __ccgo_ts + 6713 + zDb = __ccgo_ts + 6738 } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) } @@ -180548,7 +180981,7 @@ func _rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { v1 = *(*uintptr)(unsafe.Pointer(bp)) } else { - v1 = __ccgo_ts + 18615 + v1 = __ccgo_ts + 18687 } Xsqlite3_result_text(tls, ctx, v1, -int32(1), uintptr(-libc.Int32FromInt32(1))) } else { @@ -181015,19 +181448,19 @@ func _geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) if p != 0 { db = Xsqlite3_context_db_handle(tls, context) x = Xsqlite3_str_new(tls, db) - Xsqlite3_str_append(tls, x, __ccgo_ts+25336, int32(1)) + Xsqlite3_str_append(tls, x, __ccgo_ts+25391, int32(1)) i = 0 for { if !(i < (*TGeoPoly)(unsafe.Pointer(p)).FnVertex) { break } - Xsqlite3_str_appendf(tls, x, __ccgo_ts+28432, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4))))) + Xsqlite3_str_appendf(tls, x, __ccgo_ts+28487, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4))))) goto _1 _1: ; i++ } - Xsqlite3_str_appendf(tls, x, __ccgo_ts+28443, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4))))) + Xsqlite3_str_appendf(tls, x, __ccgo_ts+28498, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -int32(1), __ccgo_fp(Xsqlite3_free)) Xsqlite3_free(tls, p) } @@ -181056,20 +181489,20 @@ func _geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { db = Xsqlite3_context_db_handle(tls, context) x = Xsqlite3_str_new(tls, db) cSep = int8('\'') - Xsqlite3_str_appendf(tls, x, __ccgo_ts+28454, 0) + Xsqlite3_str_appendf(tls, x, __ccgo_ts+28509, 0) i = 0 for { if !(i < (*TGeoPoly)(unsafe.Pointer(p)).FnVertex) { break } - Xsqlite3_str_appendf(tls, x, __ccgo_ts+28472, libc.VaList(bp+8, int32(cSep), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4))))) + Xsqlite3_str_appendf(tls, x, __ccgo_ts+28527, libc.VaList(bp+8, int32(cSep), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4))))) cSep = int8(' ') goto _1 _1: ; i++ } - Xsqlite3_str_appendf(tls, x, __ccgo_ts+28480, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4))))) + Xsqlite3_str_appendf(tls, x, __ccgo_ts+28535, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4))))) i = int32(1) for { if !(i < argc) { @@ -181077,14 +181510,14 @@ func _geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, __ccgo_ts+28488, libc.VaList(bp+8, z)) + Xsqlite3_str_appendf(tls, x, __ccgo_ts+28543, libc.VaList(bp+8, z)) } goto _2 _2: ; i++ } - Xsqlite3_str_appendf(tls, x, __ccgo_ts+28492, 0) + Xsqlite3_str_appendf(tls, x, __ccgo_ts+28547, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -int32(1), __ccgo_fp(Xsqlite3_free)) Xsqlite3_free(tls, p) } @@ -181533,7 +181966,7 @@ func _geopolyBBoxFinal(tls *libc.TLS, context uintptr) { // ** Determine if point (x0,y0) is beneath line segment (x1,y1)->(x2,y2). // ** Returns: // ** -// ** +2 x0,y0 is on the line segement +// ** +2 x0,y0 is on the line segment // ** // ** +1 x0,y0 is beneath line segment // ** @@ -181676,7 +182109,7 @@ func _geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // C documentation // -// /* Objects used by the overlap algorihm. */ +// /* Objects used by the overlap algorithm. */ type TGeoEvent = struct { Fx float64 FeType int32 @@ -182213,13 +182646,13 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, *(*uintptr)(unsafe.Pointer(argv + 1*8)), libc.Uint64FromInt64(nDb)) libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), libc.Uint64FromInt64(nName)) libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, *(*uintptr)(unsafe.Pointer(argv + 2*8)), libc.Uint64FromInt64(nName)) - libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27545, uint64(6)) + libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27600, uint64(6)) /* Create/Connect to the underlying relational database schema. If ** that is successful, call sqlite3_declare_vtab() to configure ** the r-tree table schema. */ pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28505, 0) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28560, 0) (*TRtree)(unsafe.Pointer(pRtree)).FnAux = uint8(1) /* Add one for _shape */ (*TRtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = uint8(1) /* The _shape column is always not-null */ ii = int32(3) @@ -182228,13 +182661,13 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint break } (*TRtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28527, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28582, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto _1 _1: ; ii++ } - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27602, 0) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27657, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !(zSql != 0) { rc = int32(SQLITE_NOMEM) @@ -182242,7 +182675,7 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint v2 = Xsqlite3_declare_vtab(tls, db, zSql) rc = v2 if SQLITE_OK != v2 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } Xsqlite3_free(tls, zSql) @@ -182257,7 +182690,7 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint } rc = _rtreeSqlInit(tls, pRtree, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), isCreate) if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail } *(*uintptr)(unsafe.Pointer(ppVtab)) = pRtree @@ -182469,7 +182902,7 @@ func _geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) { } if iRowidTerm >= 0 { (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = int32(1) - (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 16848 + (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 16920 (*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8))).FargvIndex = int32(1) (*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8))).Fomit = uint8(1) (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(30) @@ -182479,7 +182912,7 @@ func _geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) { } if iFuncTerm >= 0 { (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28531 + (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28586 (*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8))).FargvIndex = int32(1) (*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8))).Fomit = uint8(0) (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(300) @@ -182487,7 +182920,7 @@ func _geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) { return SQLITE_OK } (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = int32(4) - (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28537 + (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28592 (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(3e+06) (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK @@ -182607,7 +183040,7 @@ func _geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pR _geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(aData + 2*8)), bp+8+8, bp) if *(*int32)(unsafe.Pointer(bp)) != 0 { if *(*int32)(unsafe.Pointer(bp)) == int32(SQLITE_ERROR) { - (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+28546, 0) + (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+28601, 0) } goto geopoly_update_end } @@ -182710,12 +183143,12 @@ geopoly_update_end: func _geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) (r int32) { _ = pVtab _ = nArg - if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28586) == 0 { + if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28641) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = __ccgo_fp(_geopolyOverlapFunc) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return int32(SQLITE_INDEX_CONSTRAINT_FUNCTION) } - if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28602) == 0 { + if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28657) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = __ccgo_fp(_geopolyWithinFunc) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return libc.Int32FromInt32(SQLITE_INDEX_CONSTRAINT_FUNCTION) + libc.Int32FromInt32(1) @@ -182786,7 +183219,7 @@ func _sqlite3_geopoly_init(tls *libc.TLS, db uintptr) (r int32) { i++ } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28779, uintptr(unsafe.Pointer(&_geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28834, uintptr(unsafe.Pointer(&_geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -182800,61 +183233,61 @@ var _aFunc = [12]struct { 0: { FnArg: int8(1), FbPure: uint8(1), - FzName: __ccgo_ts + 28617, + FzName: __ccgo_ts + 28672, }, 1: { FnArg: int8(1), FbPure: uint8(1), - FzName: __ccgo_ts + 28630, + FzName: __ccgo_ts + 28685, }, 2: { FnArg: int8(1), FbPure: uint8(1), - FzName: __ccgo_ts + 28643, + FzName: __ccgo_ts + 28698, }, 3: { FnArg: int8(-int32(1)), FbPure: uint8(1), - FzName: __ccgo_ts + 28656, + FzName: __ccgo_ts + 28711, }, 4: { FnArg: int8(2), FbPure: uint8(1), - FzName: __ccgo_ts + 28602, + FzName: __ccgo_ts + 28657, }, 5: { FnArg: int8(3), FbPure: uint8(1), - FzName: __ccgo_ts + 28668, + FzName: __ccgo_ts + 28723, }, 6: { FnArg: int8(2), FbPure: uint8(1), - FzName: __ccgo_ts + 28586, + FzName: __ccgo_ts + 28641, }, 7: { FnArg: int8(1), - FzName: __ccgo_ts + 28691, + FzName: __ccgo_ts + 28746, }, 8: { FnArg: int8(1), FbPure: uint8(1), - FzName: __ccgo_ts + 28705, + FzName: __ccgo_ts + 28760, }, 9: { FnArg: int8(7), FbPure: uint8(1), - FzName: __ccgo_ts + 28718, + FzName: __ccgo_ts + 28773, }, 10: { FnArg: int8(4), FbPure: uint8(1), - FzName: __ccgo_ts + 28732, + FzName: __ccgo_ts + 28787, }, 11: { FnArg: int8(1), FbPure: uint8(1), - FzName: __ccgo_ts + 28748, + FzName: __ccgo_ts + 28803, }, } @@ -182880,7 +183313,7 @@ var _aAgg = [1]struct { FzName uintptr }{ 0: { - FzName: __ccgo_ts + 28760, + FzName: __ccgo_ts + 28815, }, } @@ -182905,20 +183338,20 @@ func _sqlite3RtreeInit(tls *libc.TLS, db uintptr) (r int32) { var rc, utf8 int32 _, _, _, _ = c, c1, rc, utf8 utf8 = int32(SQLITE_UTF8) - rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28787, int32(2), utf8, uintptr(0), __ccgo_fp(_rtreenode), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28842, int32(2), utf8, uintptr(0), __ccgo_fp(_rtreenode), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28797, int32(1), utf8, uintptr(0), __ccgo_fp(_rtreedepth), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28852, int32(1), utf8, uintptr(0), __ccgo_fp(_rtreedepth), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28808, -int32(1), utf8, uintptr(0), __ccgo_fp(_rtreecheck), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28863, -int32(1), utf8, uintptr(0), __ccgo_fp(_rtreecheck), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { c = libc.UintptrFromInt32(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28531, uintptr(unsafe.Pointer(&_rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28586, uintptr(unsafe.Pointer(&_rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { c1 = libc.UintptrFromInt32(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28819, uintptr(unsafe.Pointer(&_rtreeModule)), c1, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28874, uintptr(unsafe.Pointer(&_rtreeModule)), c1, uintptr(0)) } if rc == SQLITE_OK { rc = _sqlite3_geopoly_init(tls, db) @@ -182992,7 +183425,7 @@ func _geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { _, _, _, _, _ = i, memErr, nBlob, pBlob, pGeomCtx pGeomCtx = Xsqlite3_user_data(tls, ctx) memErr = 0 - nBlob = libc.Int64FromUint64(uint64(64) + libc.Uint64FromInt32(nArg-libc.Int32FromInt32(1))*uint64(8) + libc.Uint64FromInt32(nArg)*uint64(8)) + nBlob = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+56) + libc.Uint64FromInt32(nArg)*uint64(8) + libc.Uint64FromInt32(nArg)*uint64(8)) pBlob = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(nBlob)) if !(pBlob != 0) { Xsqlite3_result_error_nomem(tls, ctx) @@ -183020,7 +183453,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, __ccgo_ts+26088, __ccgo_fp(_rtreeMatchArgFree)) + Xsqlite3_result_pointer(tls, ctx, pBlob, __ccgo_ts+26143, __ccgo_fp(_rtreeMatchArgFree)) } } } @@ -183261,7 +183694,7 @@ func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr ** ** "RBU" stands for "Resumable Bulk Update". As in a large database update ** transmitted via a wireless network to a mobile device. A transaction -** applied using this extension is hence refered to as an "RBU update". +** applied using this extension is hence referred to as an "RBU update". ** ** ** LIMITATIONS @@ -184237,7 +184670,7 @@ func _rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintpt /* Figure out the size of the output */ nOut = _rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, __ccgo_ts+28829, -int32(1)) + Xsqlite3_result_error(tls, context, __ccgo_ts+28884, -int32(1)) return } aOut = Xsqlite3_malloc(tls, nOut+int32(1)) @@ -184247,7 +184680,7 @@ func _rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintpt nOut2 = _rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, __ccgo_ts+28829, -int32(1)) + Xsqlite3_result_error(tls, context, __ccgo_ts+28884, -int32(1)) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, __ccgo_fp(Xsqlite3_free)) } @@ -184273,7 +184706,7 @@ func _prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg _ = rc rc = Xsqlite3_prepare_v2(tls, db, zSql, -int32(1), ppStmt, uintptr(0)) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -184296,7 +184729,7 @@ func _resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) (r in _ = rc rc = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -184428,7 +184861,7 @@ func _rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) (r int32) { /* Free any SQLite statements used while processing the previous object */ _rbuObjIterClearStatements(tls, pIter) if (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { - rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+28850, uintptr(0), uintptr(0), p+64) + rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+28905, uintptr(0), uintptr(0), p+64) } if rc == SQLITE_OK { if (*TRbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { @@ -184517,7 +184950,7 @@ func _rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -int32(1), libc.UintptrFromInt32(0)) } } else { - if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, __ccgo_ts+26001, zIn, uint64(4)) == 0 { + if libc.Xstrlen(tls, zIn) > uint64(4) && libc.Xmemcmp(tls, __ccgo_ts+26056, zIn, uint64(4)) == 0 { i = int32(4) for { if !(int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= int32('9')) { @@ -184554,13 +184987,13 @@ func _rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) (r int32) { _, _ = rc, v1 libc.Xmemset(tls, pIter, 0, uint64(192)) if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - v1 = __ccgo_ts + 29021 + v1 = __ccgo_ts + 29076 } else { v1 = __ccgo_ts + 1665 } - rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29062, libc.VaList(bp+8, v1))) + rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29117, libc.VaList(bp+8, v1))) if rc == SQLITE_OK { - rc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, __ccgo_ts+29212) + rc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+8, p+64, __ccgo_ts+29267) } (*TRbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = int32(1) (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc @@ -184727,7 +185160,7 @@ func _rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { rc = Xsqlite3_finalize(tls, pStmt) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && rc != SQLITE_OK { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } @@ -184788,7 +185221,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu *(*[4]uintptr)(unsafe.Pointer(bp)) = [4]uintptr{} *(*int32)(unsafe.Pointer(peType)) = RBU_PK_NOTABLE *(*int32)(unsafe.Pointer(piPk)) = 0 - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29337, libc.VaList(bp+40, zTab))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29392, libc.VaList(bp+40, zTab))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[0]) != int32(SQLITE_ROW) { /* Either an error, or no such table. */ goto rbuTableType_end @@ -184798,7 +185231,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu goto rbuTableType_end } *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[0], int32(1)) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+1*8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29456, libc.VaList(bp+40, zTab))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+1*8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29511, libc.VaList(bp+40, zTab))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { goto rbuTableType_end } @@ -184806,7 +185239,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu zOrig = Xsqlite3_column_text(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(1)], int32(3)) zIdx = Xsqlite3_column_text(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(1)], int32(1)) if zOrig != 0 && zIdx != 0 && libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(zOrig))) == int32('p') { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+2*8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29477, libc.VaList(bp+40, zIdx))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+2*8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29532, libc.VaList(bp+40, zIdx))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if Xsqlite3_step(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(2)]) == int32(SQLITE_ROW) { *(*int32)(unsafe.Pointer(piPk)) = Xsqlite3_column_int(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(2)], 0) @@ -184818,7 +185251,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu goto rbuTableType_end } } - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+3*8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29528, libc.VaList(bp+40, zTab))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+3*8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29583, libc.VaList(bp+40, zTab))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { for Xsqlite3_step(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(3)]) == int32(SQLITE_ROW) { if Xsqlite3_column_int(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(3)], int32(5)) > 0 { @@ -184862,7 +185295,7 @@ func _rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { bIndex = 0 if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint64(1)*libc.Uint64FromInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29549, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29604, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*TRbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -184875,7 +185308,7 @@ func _rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { if bPartial != 0 { libc.Xmemset(tls, (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, int32(0x01), uint64(1)*libc.Uint64FromInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29577, libc.VaList(bp+24, zIdx))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29632, libc.VaList(bp+24, zIdx))) for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), int32(1)) if iCid >= 0 { @@ -184928,7 +185361,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32 _rbuTableType(tls, p, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+72, bp+8, pIter+108) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+20123, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+20195, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc @@ -184939,7 +185372,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32 /* Populate the azTblCol[] and nTblCol variables based on the columns ** of the input table. Ignore any input table columns that begin with ** "rbu_". */ - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29606, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29661, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp))) _rbuAllocateIterArrays(tls, p, pIter, nCol) @@ -184950,7 +185383,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32 break } zName = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), i) - if Xsqlite3_strnicmp(tls, __ccgo_ts+29625, zName, int32(4)) != 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+29680, zName, int32(4)) != 0 { zCopy = _rbuStrndup(tls, zName, p+56) *(*int32)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol v3 = pIter + 16 @@ -184958,7 +185391,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32 *(*int32)(unsafe.Pointer(v3))++ *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(v2)*8)) = zCopy } else { - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+29630, zName) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+29685, zName) { bRbuRowid = int32(1) } } @@ -184972,17 +185405,17 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32 if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && bRbuRowid != libc.BoolInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_VTAB) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE)) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) if bRbuRowid != 0 { - v4 = __ccgo_ts + 29640 + v4 = __ccgo_ts + 29695 } else { - v4 = __ccgo_ts + 29653 + v4 = __ccgo_ts + 29708 } - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29662, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v4)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29717, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v4)) } /* Check that all non-HIDDEN columns in the destination table are also ** present in the input table. Populate the abTblPk[], azTblType[] and ** aiTblOrder[] arrays at the same time. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29691, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29746, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { zName1 = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1)) @@ -185004,7 +185437,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32 } if i == (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29713, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName1)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29768, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName1)) } else { iPk = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(5)) bNotNull = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(3)) @@ -185050,8 +185483,8 @@ func _rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) break } z = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = _rbuMPrintf(tls, p, __ccgo_ts+29740, libc.VaList(bp+8, zList, zSep, z)) - zSep = __ccgo_ts + 15147 + zList = _rbuMPrintf(tls, p, __ccgo_ts+29795, libc.VaList(bp+8, zList, zSep, z)) + zSep = __ccgo_ts + 15172 goto _1 _1: ; @@ -185085,7 +185518,7 @@ func _rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zRet = _rbuMPrintf(tls, p, __ccgo_ts+29749, libc.VaList(bp+8, zRet, zSep, zPre, zCol, zPost)) + zRet = _rbuMPrintf(tls, p, __ccgo_ts+29804, libc.VaList(bp+8, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -185133,21 +185566,21 @@ func _rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) zRet = uintptr(0) if bRowid != 0 { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29762, libc.VaList(bp+16, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29817, libc.VaList(bp+16, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { iMax = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) - zRet = _rbuMPrintf(tls, p, __ccgo_ts+29794, libc.VaList(bp+16, iMax)) + zRet = _rbuMPrintf(tls, p, __ccgo_ts+29849, libc.VaList(bp+16, iMax)) } _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) } else { - zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1665, __ccgo_ts+15147, __ccgo_ts+29817) - zSelect = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+29823, __ccgo_ts+29830, __ccgo_ts+5173) - zList = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1665, __ccgo_ts+15147, __ccgo_ts+1665) + zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1665, __ccgo_ts+15172, __ccgo_ts+29872) + zSelect = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+29878, __ccgo_ts+29885, __ccgo_ts+5199) + zList = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1665, __ccgo_ts+15172, __ccgo_ts+1665) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29838, libc.VaList(bp+16, zSelect, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29893, libc.VaList(bp+16, zSelect, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { zVal = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) - zRet = _rbuMPrintf(tls, p, __ccgo_ts+29880, libc.VaList(bp+16, zList, zVal)) + zRet = _rbuMPrintf(tls, p, __ccgo_ts+29935, libc.VaList(bp+16, zList, zVal)) } _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) } @@ -185199,7 +185632,7 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { zSep = __ccgo_ts + 1665 iCol = 0 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29577, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29632, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1)) zCollate = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(4)) @@ -185221,15 +185654,15 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { } zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else { - zCol = __ccgo_ts + 29900 + zCol = __ccgo_ts + 29955 } } else { zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) } - zLhs = _rbuMPrintf(tls, p, __ccgo_ts+29908, libc.VaList(bp+24, zLhs, zSep, zCol, zCollate)) - zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29929, libc.VaList(bp+24, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = _rbuMPrintf(tls, p, __ccgo_ts+29965, libc.VaList(bp+24, zSelect, zSep, iCol, zCol)) - zSep = __ccgo_ts + 15147 + zLhs = _rbuMPrintf(tls, p, __ccgo_ts+29963, libc.VaList(bp+24, zLhs, zSep, zCol, zCollate)) + zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29984, libc.VaList(bp+24, zOrder, zSep, iCol, zCol, zCollate)) + zSelect = _rbuMPrintf(tls, p, __ccgo_ts+30020, libc.VaList(bp+24, zSelect, zSep, iCol, zCol)) + zSep = __ccgo_ts + 15172 iCol++ } _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) @@ -185238,7 +185671,7 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29992, libc.VaList(bp+24, zSelect, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+30047, libc.VaList(bp+24, zSelect, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { zSep = __ccgo_ts + 1665 iCol = 0 @@ -185255,15 +185688,15 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { break } } - zVector = _rbuMPrintf(tls, p, __ccgo_ts+30040, libc.VaList(bp+24, zVector, zSep, zQuoted)) - zSep = __ccgo_ts + 15147 + zVector = _rbuMPrintf(tls, p, __ccgo_ts+30095, libc.VaList(bp+24, zVector, zSep, zQuoted)) + zSep = __ccgo_ts + 15172 goto _2 _2: ; iCol++ } if !(bFailed != 0) { - zRet = _rbuMPrintf(tls, p, __ccgo_ts+30047, libc.VaList(bp+24, zLhs, zVector)) + zRet = _rbuMPrintf(tls, p, __ccgo_ts+30102, libc.VaList(bp+24, zLhs, zVector)) } } _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -185321,7 +185754,7 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter zAnd = __ccgo_ts + 1665 /* Set to " AND " later on */ *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* PRAGMA index_xinfo = ? */ if rc == SQLITE_OK { - rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29577, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29632, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1)) @@ -185330,7 +185763,7 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter zCol = uintptr(0) if iCid == -int32(2) { iSeq = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) - zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30059, libc.VaList(bp+16, zRet, zCom, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*16))).FnSpan, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*16))).FzSpan, zCollate)) + zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30114, libc.VaList(bp+16, zRet, zCom, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*16))).FnSpan, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*16))).FzSpan, zCollate)) zType = __ccgo_ts + 1665 } else { if iCid < 0 { @@ -185350,9 +185783,9 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) } else { if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = __ccgo_ts + 29900 + zCol = __ccgo_ts + 29955 } else { - zCol = __ccgo_ts + 29630 + zCol = __ccgo_ts + 29685 } } zType = __ccgo_ts + 1139 @@ -185360,24 +185793,24 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30081, libc.VaList(bp+16, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30136, libc.VaList(bp+16, zRet, zCom, zCol, zCollate)) } if (*TRbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(5)) != 0 { if bDesc != 0 { - v2 = __ccgo_ts + 29817 + v2 = __ccgo_ts + 29872 } else { v2 = __ccgo_ts + 1665 } zOrder = v2 - zImpPK = Xsqlite3_mprintf(tls, __ccgo_ts+30101, libc.VaList(bp+16, zImpPK, zCom, nBind, zCol, zOrder)) + zImpPK = Xsqlite3_mprintf(tls, __ccgo_ts+30156, libc.VaList(bp+16, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, __ccgo_ts+30122, libc.VaList(bp+16, zImpCols, zCom, nBind, zCol, zType, zCollate)) - zWhere = Xsqlite3_mprintf(tls, __ccgo_ts+30155, libc.VaList(bp+16, zWhere, zAnd, nBind, zCol)) + zImpCols = Xsqlite3_mprintf(tls, __ccgo_ts+30177, libc.VaList(bp+16, zImpCols, zCom, nBind, zCol, zType, zCollate)) + zWhere = Xsqlite3_mprintf(tls, __ccgo_ts+30210, libc.VaList(bp+16, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = int32(SQLITE_NOMEM) } - zCom = __ccgo_ts + 15147 - zAnd = __ccgo_ts + 22232 + zCom = __ccgo_ts + 15172 + zAnd = __ccgo_ts + 22304 nBind++ } rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -185431,11 +185864,11 @@ func _rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr } if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = Xsqlite3_mprintf(tls, __ccgo_ts+30179, libc.VaList(bp+8, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, __ccgo_ts+30234, libc.VaList(bp+8, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, __ccgo_ts+30191, libc.VaList(bp+8, zList, zS)) + zList = Xsqlite3_mprintf(tls, __ccgo_ts+30246, libc.VaList(bp+8, zList, zS)) } - zS = __ccgo_ts + 15147 + zS = __ccgo_ts + 15172 if zList == uintptr(0) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM) break @@ -185447,7 +185880,7 @@ func _rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr } /* For a table with implicit rowids, append "old._rowid_" to the list. */ if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) { - zList = _rbuMPrintf(tls, p, __ccgo_ts+30200, libc.VaList(bp+8, zList, zObj)) + zList = _rbuMPrintf(tls, p, __ccgo_ts+30255, libc.VaList(bp+8, zList, zObj)) } } return zList @@ -185473,7 +185906,7 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { _, _, _, _, _, _ = i, i1, zCol, zList, zSep, zSep1 zList = uintptr(0) if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_VTAB) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) { - zList = _rbuMPrintf(tls, p, __ccgo_ts+30215, libc.VaList(bp+8, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+int32(1))) + zList = _rbuMPrintf(tls, p, __ccgo_ts+30270, libc.VaList(bp+8, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+int32(1))) } else { if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) { zSep = __ccgo_ts + 1665 @@ -185483,15 +185916,15 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { break } if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = _rbuMPrintf(tls, p, __ccgo_ts+30229, libc.VaList(bp+8, zList, zSep, i, i+int32(1))) - zSep = __ccgo_ts + 22232 + zList = _rbuMPrintf(tls, p, __ccgo_ts+30284, libc.VaList(bp+8, zList, zSep, i, i+int32(1))) + zSep = __ccgo_ts + 22304 } goto _1 _1: ; i++ } - zList = _rbuMPrintf(tls, p, __ccgo_ts+30241, libc.VaList(bp+8, zList)) + zList = _rbuMPrintf(tls, p, __ccgo_ts+30296, libc.VaList(bp+8, zList)) } else { zSep1 = __ccgo_ts + 1665 i1 = 0 @@ -185501,8 +185934,8 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { } if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i1))) != 0 { zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i1)*8)) - zList = _rbuMPrintf(tls, p, __ccgo_ts+30291, libc.VaList(bp+8, zList, zSep1, zCol, i1+int32(1))) - zSep1 = __ccgo_ts + 22232 + zList = _rbuMPrintf(tls, p, __ccgo_ts+30346, libc.VaList(bp+8, zList, zSep1, zCol, i1+int32(1))) + zSep1 = __ccgo_ts + 22304 } goto _2 _2: @@ -185525,7 +185958,7 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { // */ func _rbuBadControlError(tls *libc.TLS, p uintptr) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+30304, 0) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+30359, 0) } // C documentation @@ -185567,16 +186000,16 @@ func _rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintpt } c = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == int32('x') { - zList = _rbuMPrintf(tls, p, __ccgo_ts+30291, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+int32(1))) - zSep = __ccgo_ts + 15147 + zList = _rbuMPrintf(tls, p, __ccgo_ts+30346, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+int32(1))) + zSep = __ccgo_ts + 15172 } else { if int32(c) == int32('d') { - zList = _rbuMPrintf(tls, p, __ccgo_ts+30330, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+int32(1))) - zSep = __ccgo_ts + 15147 + zList = _rbuMPrintf(tls, p, __ccgo_ts+30385, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+int32(1))) + zSep = __ccgo_ts + 15172 } else { if int32(c) == int32('f') { - zList = _rbuMPrintf(tls, p, __ccgo_ts+30360, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+int32(1))) - zSep = __ccgo_ts + 15147 + zList = _rbuMPrintf(tls, p, __ccgo_ts+30415, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), i+int32(1))) + zSep = __ccgo_ts + 15172 } } } @@ -185660,16 +186093,16 @@ func _rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { _, _, _, _, _, _, _ = z, zCol, zDesc, zIdx, zOrig, zSep, v1 z = uintptr(0) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - zSep = __ccgo_ts + 30397 + zSep = __ccgo_ts + 30452 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* PRAGMA index_list = (pIter->zTbl) */ *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) /* PRAGMA index_xinfo = <pk-index> */ - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29549, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29604, libc.VaList(bp+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { zOrig = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(3)) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, __ccgo_ts+16736) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, __ccgo_ts+16808) == 0 { zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1)) if zIdx != 0 { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29577, libc.VaList(bp+24, zIdx))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29632, libc.VaList(bp+24, zIdx))) } break } @@ -185680,16 +186113,16 @@ func _rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) { /* int iCid = sqlite3_column_int(pXInfo, 0); */ zCol = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), int32(2)) if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), int32(3)) != 0 { - v1 = __ccgo_ts + 29817 + v1 = __ccgo_ts + 29872 } else { v1 = __ccgo_ts + 1665 } zDesc = v1 - z = _rbuMPrintf(tls, p, __ccgo_ts+30410, libc.VaList(bp+24, z, zSep, zCol, zDesc)) - zSep = __ccgo_ts + 15147 + z = _rbuMPrintf(tls, p, __ccgo_ts+30465, libc.VaList(bp+24, z, zSep, zCol, zDesc)) + zSep = __ccgo_ts + 15172 } } - z = _rbuMPrintf(tls, p, __ccgo_ts+30421, libc.VaList(bp+24, z)) + z = _rbuMPrintf(tls, p, __ccgo_ts+30476, libc.VaList(bp+24, z)) _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) } return z @@ -185735,7 +186168,7 @@ func _rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* Figure out the name of the primary key index for the current table. ** This is needed for the argument to "PRAGMA index_xinfo". Set ** zIdx to point to a nul-terminated string containing this name. */ - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, __ccgo_ts+30425) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, __ccgo_ts+30480) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1), tnum) if int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -185743,7 +186176,7 @@ func _rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { } } if zIdx != 0 { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29577, libc.VaList(bp+24, zIdx))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+29632, libc.VaList(bp+24, zIdx))) } _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { @@ -185752,21 +186185,21 @@ func _rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), int32(1)) bDesc = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), int32(3)) zCollate = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), int32(4)) - zCols = _rbuMPrintf(tls, p, __ccgo_ts+30475, libc.VaList(bp+24, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) + zCols = _rbuMPrintf(tls, p, __ccgo_ts+30530, libc.VaList(bp+24, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) if bDesc != 0 { - v1 = __ccgo_ts + 29817 + v1 = __ccgo_ts + 29872 } else { v1 = __ccgo_ts + 1665 } - zPk = _rbuMPrintf(tls, p, __ccgo_ts+30497, libc.VaList(bp+24, zPk, zComma, iCid, v1)) - zComma = __ccgo_ts + 15147 + zPk = _rbuMPrintf(tls, p, __ccgo_ts+30552, libc.VaList(bp+24, zPk, zComma, iCid, v1)) + zComma = __ccgo_ts + 15172 } } - zCols = _rbuMPrintf(tls, p, __ccgo_ts+30507, libc.VaList(bp+24, zCols)) + zCols = _rbuMPrintf(tls, p, __ccgo_ts+30562, libc.VaList(bp+24, zCols)) _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, int32(1), tnum)) - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30522, libc.VaList(bp+24, zCols, zPk)) - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, 0, 0)) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, int32(1), tnum)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30577, libc.VaList(bp+24, zCols, zPk)) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, 0, 0)) } } @@ -185803,7 +186236,7 @@ func _rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { tnum = (*TRbuObjIter)(unsafe.Pointer(pIter)).FiTnum zComma = __ccgo_ts + 1665 zSql = uintptr(0) - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, 0, int32(1))) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, 0, int32(1))) iCol = 0 for { if !((*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol) { @@ -185812,19 +186245,19 @@ func _rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { zPk = __ccgo_ts + 1665 zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp, uintptr(0), uintptr(0), uintptr(0)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp, uintptr(0), uintptr(0), uintptr(0)) if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_IPK) && *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { /* If the target table column is an "INTEGER PRIMARY KEY", add ** "PRIMARY KEY" to the imposter table column declaration. */ - zPk = __ccgo_ts + 30584 + zPk = __ccgo_ts + 30639 } if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - v2 = __ccgo_ts + 30597 + v2 = __ccgo_ts + 30652 } else { v2 = __ccgo_ts + 1665 } - zSql = _rbuMPrintf(tls, p, __ccgo_ts+30607, libc.VaList(bp+16, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp)), v2)) - zComma = __ccgo_ts + 15147 + zSql = _rbuMPrintf(tls, p, __ccgo_ts+30662, libc.VaList(bp+16, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp)), v2)) + zComma = __ccgo_ts + 15172 goto _1 _1: ; @@ -185833,17 +186266,17 @@ func _rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_WITHOUT_ROWID) { zPk1 = _rbuWithoutRowidPK(tls, p, pIter) if zPk1 != 0 { - zSql = _rbuMPrintf(tls, p, __ccgo_ts+30634, libc.VaList(bp+16, zSql, zPk1)) + zSql = _rbuMPrintf(tls, p, __ccgo_ts+30689, libc.VaList(bp+16, zSql, zPk1)) } } - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, int32(1), tnum)) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, int32(1), tnum)) if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_WITHOUT_ROWID) { - v3 = __ccgo_ts + 30641 + v3 = __ccgo_ts + 30696 } else { v3 = __ccgo_ts + 1665 } - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30656, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, v3)) - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, 0, 0)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30711, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, v3)) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, 0, 0)) } } @@ -185869,7 +186302,7 @@ func _rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zColli bRbuRowid = libc.BoolInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE)) zBind = _rbuObjIterGetBindlist(tls, p, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+int32(1)+bRbuRowid) if zBind != 0 { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+30688, libc.VaList(bp+8, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+152, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+30743, libc.VaList(bp+8, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } @@ -185915,7 +186348,7 @@ func _rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintpt *(*int32)(unsafe.Pointer(bp + 8)) = (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc zRet = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8)) = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, __ccgo_ts+30745) + *(*int32)(unsafe.Pointer(bp + 8)) = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+64, __ccgo_ts+30800) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8)) = Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1), (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx, -int32(1), libc.UintptrFromInt32(0)) @@ -186084,7 +186517,7 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 zIdx = (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx zLimit = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, __ccgo_ts+30811, libc.VaList(bp+40, nOffset)) + zLimit = Xsqlite3_mprintf(tls, __ccgo_ts+30866, libc.VaList(bp+40, nOffset)) if !(zLimit != 0) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM) } @@ -186101,18 +186534,18 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 zCollist = _rbuObjIterGetIndexCols(tls, p, pIter, bp, bp+8, bp+16, bp+24) zBind = _rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 24))) /* Create the imposter table used to write to this index. */ - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+40, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, 0, int32(1))) - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+40, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, int32(1), tnum)) - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30831, libc.VaList(bp+40, zTbl, *(*uintptr)(unsafe.Pointer(bp)), *(*uintptr)(unsafe.Pointer(bp + 8)))) - Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+40, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, 0, 0)) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+40, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, 0, int32(1))) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+40, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, int32(1), tnum)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30886, libc.VaList(bp+40, zTbl, *(*uintptr)(unsafe.Pointer(bp)), *(*uintptr)(unsafe.Pointer(bp + 8)))) + Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+40, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, 0, 0)) /* Create the statement to insert index entries */ (*TRbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 24)) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+30896, libc.VaList(bp+40, zTbl, zBind))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+30951, libc.VaList(bp+40, zTbl, zBind))) } /* And to delete index entries */ if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+30932, libc.VaList(bp+40, zTbl, *(*uintptr)(unsafe.Pointer(bp + 16))))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+30987, libc.VaList(bp+40, zTbl, *(*uintptr)(unsafe.Pointer(bp + 16))))) } /* Create the SELECT statement to read keys in sorted order */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -186127,26 +186560,26 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 } if zStart != 0 { if zPart != 0 { - v2 = __ccgo_ts + 30966 + v2 = __ccgo_ts + 31021 } else { - v2 = __ccgo_ts + 30970 + v2 = __ccgo_ts + 31025 } v1 = v2 } else { v1 = __ccgo_ts + 1665 } - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+30976, libc.VaList(bp+40, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v1, zStart, zCollist, zLimit)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31031, libc.VaList(bp+40, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v1, zStart, zCollist, zLimit)) Xsqlite3_free(tls, zStart) } else { if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) { - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31037, libc.VaList(bp+40, zCollist, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31092, libc.VaList(bp+40, zCollist, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { if zPart != 0 { - v3 = __ccgo_ts + 30966 + v3 = __ccgo_ts + 31021 } else { - v3 = __ccgo_ts + 30970 + v3 = __ccgo_ts + 31025 } - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31098, libc.VaList(bp+40, zCollist, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v3, zCollist, zLimit)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31153, libc.VaList(bp+40, zCollist, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v3, zCollist, zLimit)) } } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -186165,8 +186598,8 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 zTbl1 = (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl /* Imposter table name */ zBindings = _rbuObjIterGetBindlist(tls, p, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+bRbuRowid) zWhere1 = _rbuObjIterGetWhere(tls, p, pIter) - zOldlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6724) - zNewlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6720) + zOldlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6749) + zNewlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6745) zCollist = _rbuObjIterGetCollist(tls, p, pIter) (*TRbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol /* Create the imposter table or tables (if required). */ @@ -186175,39 +186608,39 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_VTAB) { v4 = __ccgo_ts + 1665 } else { - v4 = __ccgo_ts + 31257 + v4 = __ccgo_ts + 31312 } zWrite = v4 /* Create the INSERT statement to write to the target PK b-tree */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if bRbuRowid != 0 { - v5 = __ccgo_ts + 31266 + v5 = __ccgo_ts + 31321 } else { v5 = __ccgo_ts + 1665 } - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31276, libc.VaList(bp+40, zWrite, zTbl1, zCollist, v5, zBindings))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+136, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31331, libc.VaList(bp+40, zWrite, zTbl1, zCollist, v5, zBindings))) } /* Create the DELETE statement to write to the target PK b-tree. ** Because it only performs INSERT operations, this is not required for ** an rbu vacuum handle. */ if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31312, libc.VaList(bp+40, zWrite, zTbl1, zWhere1))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+144, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31367, libc.VaList(bp+40, zWrite, zTbl1, zWhere1))) } if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { zRbuRowid = __ccgo_ts + 1665 if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) { - zRbuRowid = __ccgo_ts + 31340 + zRbuRowid = __ccgo_ts + 31395 } /* Create the rbu_tmp_xxx table and the triggers to populate it. */ if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) { - v6 = __ccgo_ts + 31352 + v6 = __ccgo_ts + 31407 } else { v6 = __ccgo_ts + 1665 } - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+31369, libc.VaList(bp+40, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v6, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31445, libc.VaList(bp+40, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zNewlist)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+31424, libc.VaList(bp+40, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v6, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31500, libc.VaList(bp+40, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zNewlist)) if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) { - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31744, libc.VaList(bp+40, zWrite, zTbl1, zNewlist)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31799, libc.VaList(bp+40, zWrite, zTbl1, zNewlist)) } _rbuObjIterPrepareTmpInsert(tls, p, pIter, zCollist, zRbuRowid) } @@ -186218,9 +186651,9 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 zOrder = uintptr(0) if bRbuRowid != 0 { if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - v7 = __ccgo_ts + 31843 + v7 = __ccgo_ts + 31898 } else { - v7 = __ccgo_ts + 31853 + v7 = __ccgo_ts + 31908 } zRbuRowid1 = v7 } @@ -186233,14 +186666,14 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 } } if bRbuRowid != 0 { - zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29900, 0) + zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29955, 0) } else { - zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1665, __ccgo_ts+15147, __ccgo_ts+1665) + zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1665, __ccgo_ts+15172, __ccgo_ts+1665) } } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - v8 = __ccgo_ts + 31864 + v8 = __ccgo_ts + 31919 } else { v8 = __ccgo_ts + 1665 } @@ -186250,11 +186683,11 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3 v9 = __ccgo_ts + 1665 } if zOrder != 0 { - v10 = __ccgo_ts + 23488 + v10 = __ccgo_ts + 23560 } else { v10 = __ccgo_ts + 1665 } - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31870, libc.VaList(bp+40, zCollist, v8, zRbuRowid1, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v9, v10, zOrder, zLimit))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+128, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31925, libc.VaList(bp+40, zCollist, v8, zRbuRowid1, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v9, v10, zOrder, zLimit))) } Xsqlite3_free(tls, zStart1) Xsqlite3_free(tls, zOrder) @@ -186342,9 +186775,9 @@ func _rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, p if zSet != 0 { zPrefix = __ccgo_ts + 1665 if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType != int32(RBU_PK_VTAB) { - zPrefix = __ccgo_ts + 31257 + zPrefix = __ccgo_ts + 31312 } - zUpdate = Xsqlite3_mprintf(tls, __ccgo_ts+31918, libc.VaList(bp+8, zPrefix, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) + zUpdate = Xsqlite3_mprintf(tls, __ccgo_ts+31973, libc.VaList(bp+8, zPrefix, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+8, p+64, zUpdate) *(*uintptr)(unsafe.Pointer(ppStmt)) = (*TRbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate } @@ -186371,7 +186804,7 @@ func _rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) (r } (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_open_v2(tls, zName, bp, flags, v1) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+16, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp))))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+16, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp))) *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) } @@ -186418,7 +186851,7 @@ func _rbuLoadState(tls *libc.TLS, p uintptr) (r uintptr) { if pRet == uintptr(0) { return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 8)) = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+31948, libc.VaList(bp+24, p+48))) + *(*int32)(unsafe.Pointer(bp + 8)) = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+32003, libc.VaList(bp+24, p+48))) for *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) { case int32(RBU_STATE_STAGE): @@ -186477,27 +186910,27 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu = _rbuOpenDbhandle(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, int32(1)) (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain = dbMain if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6713, int32(SQLITE_FCNTL_RBUCNT), p) + Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6738, int32(SQLITE_FCNTL_RBUCNT), p) if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { - zFile = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6713) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+31978, libc.VaList(bp+8, zFile, zFile)) + zFile = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6738) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+32033, libc.VaList(bp+8, zFile, zFile)) } } /* If using separate RBU and state databases, attach the state database to ** the RBU db handle now. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32006, libc.VaList(bp+8, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+48, __ccgo_ts+3485, uint64(4)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32061, libc.VaList(bp+8, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+48, __ccgo_ts+3511, uint64(4)) } else { - libc.Xmemcpy(tls, p+48, __ccgo_ts+6713, uint64(4)) + libc.Xmemcpy(tls, p+48, __ccgo_ts+6738, uint64(4)) } /* If it has not already been created, create the rbu_state table */ - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32024, libc.VaList(bp+8, p+48)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32079, libc.VaList(bp+8, p+48)) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { bOpen = 0 (*Tsqlite3rbu)(unsafe.Pointer(p)).FnRbu = 0 (*Tsqlite3rbu)(unsafe.Pointer(p)).FpRbuFd = uintptr(0) - rc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6713, int32(SQLITE_FCNTL_RBUCNT), p) + rc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6738, int32(SQLITE_FCNTL_RBUCNT), p) if rc != int32(SQLITE_NOTFOUND) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -186530,10 +186963,10 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32090, 0) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32145, 0) } else { zExtra = uintptr(0) - if libc.Xstrlen(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+24831, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { + if libc.Xstrlen(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+24903, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5)) { zExtra = (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { v1 = zExtra @@ -186549,14 +186982,14 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if zExtra == uintptr(0) { v2 = __ccgo_ts + 1665 } else { - v2 = __ccgo_ts + 32122 + v2 = __ccgo_ts + 32177 } if zExtra == uintptr(0) { v3 = __ccgo_ts + 1665 } else { v3 = zExtra } - zTarget = Xsqlite3_mprintf(tls, __ccgo_ts+32124, libc.VaList(bp+8, Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6713), v2, v3)) + zTarget = Xsqlite3_mprintf(tls, __ccgo_ts+32179, libc.VaList(bp+8, Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6738), v2, v3)) if zTarget == uintptr(0) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM) return @@ -186567,27 +187000,27 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32156, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTmpInsertFunc), uintptr(0), uintptr(0)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32211, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTmpInsertFunc), uintptr(0), uintptr(0)) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32171, int32(2), int32(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rbuFossilDeltaFunc), uintptr(0), uintptr(0)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32226, int32(2), int32(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rbuFossilDeltaFunc), uintptr(0), uintptr(0)) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32188, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTargetNameFunc), uintptr(0), uintptr(0)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32243, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTargetNameFunc), uintptr(0), uintptr(0)) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, int32(SQLITE_FCNTL_RBU), p) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, int32(SQLITE_FCNTL_RBU), p) } - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32204, 0) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32259, 0) /* Mark the database file just opened as an RBU target database. If ** this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. ** This is an error. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, int32(SQLITE_FCNTL_RBU), p) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, int32(SQLITE_FCNTL_RBU), p) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == int32(SQLITE_NOTFOUND) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32232, 0) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32287, 0) } } @@ -186673,7 +187106,7 @@ func _rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { if pState == uintptr(0) { (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32204, uintptr(0), uintptr(0), uintptr(0)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32259, uintptr(0), uintptr(0), uintptr(0)) } } /* Assuming no error has occurred, run a "restart" checkpoint with the @@ -186706,7 +187139,7 @@ func _rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_CAPTURE) - rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32250, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32305, uintptr(0), uintptr(0), uintptr(0)) if rc2 != int32(SQLITE_NOTICE) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -186839,16 +187272,16 @@ func _rbuLockDatabase(tls *libc.TLS, db uintptr) (r int32) { _ = rc rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, db, __ccgo_ts+6713, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp) + Xsqlite3_file_control(tls, db, __ccgo_ts+6738, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { - Xsqlite3_file_control(tls, db, __ccgo_ts+6713, int32(SQLITE_FCNTL_FILE_POINTER), bp) + Xsqlite3_file_control(tls, db, __ccgo_ts+6738, int32(SQLITE_FCNTL_FILE_POINTER), bp) rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods)).FxLock})))(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(SQLITE_LOCK_SHARED)) if rc == SQLITE_OK { rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods)).FxUnlock})))(tls, *(*uintptr)(unsafe.Pointer(bp)), SQLITE_LOCK_NONE) } - Xsqlite3_file_control(tls, db, __ccgo_ts+6713, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp) + Xsqlite3_file_control(tls, db, __ccgo_ts+6738, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp) } else { - Xsqlite3_file_control(tls, db, __ccgo_ts+6713, int32(SQLITE_FCNTL_FILE_POINTER), bp) + Xsqlite3_file_control(tls, db, __ccgo_ts+6738, int32(SQLITE_FCNTL_FILE_POINTER), bp) } if rc == SQLITE_OK && (*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods)).FxLock})))(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(SQLITE_LOCK_SHARED)) @@ -186870,7 +187303,7 @@ func _rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) (r int32) { var zUri uintptr _ = zUri zUri = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, __ccgo_ts+32285, 0) + return Xsqlite3_uri_boolean(tls, zUri, __ccgo_ts+32340, 0) } // C documentation @@ -186887,13 +187320,13 @@ func _rbuMoveOalFile(tls *libc.TLS, p uintptr) { defer tls.Free(16) var dbMain, zBase, zMove, zOal, zWal uintptr _, _, _, _, _ = dbMain, zBase, zMove, zOal, zWal - zBase = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713) + zBase = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738) zMove = zBase if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6713) + zMove = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6738) } - zOal = Xsqlite3_mprintf(tls, __ccgo_ts+32310, libc.VaList(bp+8, zMove)) - zWal = Xsqlite3_mprintf(tls, __ccgo_ts+32317, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, __ccgo_ts+32365, libc.VaList(bp+8, zMove)) + zWal = Xsqlite3_mprintf(tls, __ccgo_ts+32372, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM) } else { @@ -187025,7 +187458,7 @@ func _rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { ** to write a NULL into the IPK column. That is not permitted. */ if eType == int32(RBU_INSERT) && (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) && (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_IPK) && *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 && Xsqlite3_column_type(tls, (*TRbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) == int32(SQLITE_NULL) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_MISMATCH) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+24388, 0) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+24460, 0) return } if eType == int32(RBU_DELETE) && libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0 { @@ -187161,7 +187594,7 @@ func _rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { } dbread = v1 iCookie = int32(1000000) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, dbread, bp, p+64, __ccgo_ts+32324) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, dbread, bp, p+64, __ccgo_ts+32379) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { /* Coverage: it may be that this sqlite3_step() cannot fail. There ** is already a transaction open, so the prepared statement cannot @@ -187174,7 +187607,7 @@ func _rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32346, libc.VaList(bp+16, iCookie+int32(1))) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32401, libc.VaList(bp+16, iCookie+int32(1))) } } } @@ -187201,7 +187634,7 @@ func _rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { v1 = (*Tsqlite3rbu)(unsafe.Pointer(p)).FpTargetFd } pFd = v1 - rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+32373, libc.VaList(bp+16, p+48, int32(RBU_STATE_STAGE), eStage, int32(RBU_STATE_TBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, int32(RBU_STATE_IDX), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzIdx, int32(RBU_STATE_ROW), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnStep, int32(RBU_STATE_PROGRESS), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnProgress, int32(RBU_STATE_CKPT), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiWalCksum, int32(RBU_STATE_COOKIE), libc.Int64FromUint32((*Trbu_file)(unsafe.Pointer(pFd)).FiCookie), int32(RBU_STATE_OALSZ), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiOalSz, int32(RBU_STATE_PHASEONESTEP), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep, int32(RBU_STATE_DATATBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzDataTbl))) + rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+32428, libc.VaList(bp+16, p+48, int32(RBU_STATE_STAGE), eStage, int32(RBU_STATE_TBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, int32(RBU_STATE_IDX), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzIdx, int32(RBU_STATE_ROW), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnStep, int32(RBU_STATE_PROGRESS), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnProgress, int32(RBU_STATE_CKPT), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiWalCksum, int32(RBU_STATE_COOKIE), libc.Int64FromUint32((*Trbu_file)(unsafe.Pointer(pFd)).FiCookie), int32(RBU_STATE_OALSZ), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiOalSz, int32(RBU_STATE_PHASEONESTEP), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep, int32(RBU_STATE_DATATBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzDataTbl))) if rc == SQLITE_OK { Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp))) @@ -187237,9 +187670,9 @@ func _rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { var _ /* pPragma at bp+0 */ uintptr if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+32533, libc.VaList(bp+16, zPragma))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+32588, libc.VaList(bp+16, zPragma))) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32548, libc.VaList(bp+16, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0))) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32603, libc.VaList(bp+16, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0))) } _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) } @@ -187262,9 +187695,9 @@ func _rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { _, _ = i, zSql *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32568, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32623, uintptr(0), uintptr(0), p+64) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+32593) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+32648) } for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == int32(SQLITE_ROW) { zSql = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) @@ -187275,10 +187708,10 @@ func _rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { return } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+32701) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+32756) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, __ccgo_ts+32766) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8, p+64, __ccgo_ts+32821) } for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == int32(SQLITE_ROW) { i = 0 @@ -187296,7 +187729,7 @@ func _rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32810, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32865, uintptr(0), uintptr(0), p+64) } _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp))) _rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -187323,8 +187756,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) (r int32) { ** when this handle was opened, create the target database schema. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Tsqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { _rbuCreateTargetSchema(tls, p) - _rbuCopyPragma(tls, p, __ccgo_ts+17821) - _rbuCopyPragma(tls, p, __ccgo_ts+16932) + _rbuCopyPragma(tls, p, __ccgo_ts+17893) + _rbuCopyPragma(tls, p, __ccgo_ts+17004) } for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { if (*TRbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { @@ -187332,7 +187765,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) (r int32) { ** cannot be dropped as there are currently active SQL statements. ** But the contents can be deleted. */ if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32835, libc.VaList(bp+16, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32890, libc.VaList(bp+16, p+48, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { _rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -187354,10 +187787,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) (r int32) { _rbuSaveState(tls, p, int32(RBU_STAGE_MOVE)) _rbuIncrSchemaCookie(tls, p) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15051, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15076, uintptr(0), uintptr(0), p+64) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15051, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15076, uintptr(0), uintptr(0), p+64) } (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_MOVE) } @@ -187444,7 +187877,7 @@ func _rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { } if rc == SQLITE_OK && !((*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0) { rc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32863, 0) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32918, 0) } if rc == SQLITE_OK { (*Tsqlite3rbu)(unsafe.Pointer(p)).FnStep = (*TRbuState)(unsafe.Pointer(pState)).FnRow @@ -187467,10 +187900,10 @@ func _rbuDeleteOalFile(tls *libc.TLS, p uintptr) { var zOal uintptr var _ /* pVfs at bp+0 */ uintptr _ = zOal - zOal = _rbuMPrintf(tls, p, __ccgo_ts+32310, libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + zOal = _rbuMPrintf(tls, p, __ccgo_ts+32365, libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6713, int32(SQLITE_FCNTL_VFS_POINTER), bp) + Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6738, int32(SQLITE_FCNTL_VFS_POINTER), bp) (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_vfs)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FxDelete})))(tls, *(*uintptr)(unsafe.Pointer(bp)), zOal, 0) Xsqlite3_free(tls, zOal) } @@ -187492,7 +187925,7 @@ func _rbuCreateVfs(tls *libc.TLS, p uintptr) { var _ /* zRnd at bp+4 */ [64]int8 _ = pVfs Xsqlite3_randomness(tls, int32(4), bp) - Xsqlite3_snprintf(tls, int32(64), bp+4, __ccgo_ts+32888, libc.VaList(bp+80, *(*int32)(unsafe.Pointer(bp)))) + Xsqlite3_snprintf(tls, int32(64), bp+4, __ccgo_ts+32943, libc.VaList(bp+80, *(*int32)(unsafe.Pointer(bp)))) (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+4, uintptr(0)) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { pVfs = Xsqlite3_vfs_find(tls, bp+4) @@ -187539,7 +187972,7 @@ func _rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } db = v1 _ = nVal - rc = _prepareFreeAndCollectError(tls, db, bp, bp+8, Xsqlite3_mprintf(tls, __ccgo_ts+32899, libc.VaList(bp+24, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + rc = _prepareFreeAndCollectError(tls, db, bp, bp+8, Xsqlite3_mprintf(tls, __ccgo_ts+32954, libc.VaList(bp+24, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 8)), -int32(1)) } else { @@ -187584,11 +188017,11 @@ func _rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) bExists = 0 /* True if rbu_count exists */ (*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-int32(1)) - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32971, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuIndexCntFunc), uintptr(0), uintptr(0)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+33026, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuIndexCntFunc), uintptr(0), uintptr(0)) /* Check for the rbu_count table. If it does not exist, or if an error ** occurs, nPhaseOneStep will be left set to -1. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+32985) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+33040) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -187597,7 +188030,7 @@ func _rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp))) } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+33042) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+64, __ccgo_ts+33097) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) @@ -187645,7 +188078,7 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr libc.Xmemcpy(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+uint64(1)) pCsr += uintptr(nRbu + uint64(1)) if zState != 0 { - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+3862, libc.VaList(bp+16, zState)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+3888, libc.VaList(bp+16, zState)) } /* If the first attempt to open the database file fails and the bRetry ** flag it set, this means that the db was not opened because it seemed @@ -187677,7 +188110,7 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Trbu_file)(unsafe.Pointer((*Tsqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33116, 0) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33171, 0) } else { if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_MOVE) { (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_CKPT) @@ -187699,17 +188132,17 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr ** page 1 of the database file. */ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_BUSY) if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - v3 = __ccgo_ts + 33148 + v3 = __ccgo_ts + 33203 } else { - v3 = __ccgo_ts + 33155 + v3 = __ccgo_ts + 33210 } - (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33162, libc.VaList(bp+16, v3)) + (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33217, libc.VaList(bp+16, v3)) } } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) { db = (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15036, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15061, uintptr(0), uintptr(0), p+64) /* Point the object iterator at the first object */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _rbuObjIterFirst(tls, p, p+88) @@ -187721,21 +188154,21 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_DONE) } else { if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*TRbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - _rbuCopyPragma(tls, p, __ccgo_ts+17535) - _rbuCopyPragma(tls, p, __ccgo_ts+16947) + _rbuCopyPragma(tls, p, __ccgo_ts+17607) + _rbuCopyPragma(tls, p, __ccgo_ts+17019) } /* Open transactions both databases. The *-oal file is opened or ** created at this point. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33194, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33249, uintptr(0), uintptr(0), p+64) } /* Check if the main database is a zipvfs db. If it is, set the upper ** level pager to use "journal_mode=off". This prevents it from ** generating a large journal using a temp file. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - frc = Xsqlite3_file_control(tls, db, __ccgo_ts+6713, int32(SQLITE_FCNTL_ZIPVFS), uintptr(0)) + frc = Xsqlite3_file_control(tls, db, __ccgo_ts+6738, int32(SQLITE_FCNTL_ZIPVFS), uintptr(0)) if frc == SQLITE_OK { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33210, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33265, uintptr(0), uintptr(0), p+64) } } if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -187813,7 +188246,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) (r uintp } if zState != 0 { n = libc.Xstrlen(tls, zState) - if n >= uint64(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+33234, zState+uintptr(n-uint64(7)), uint64(7)) { + if n >= uint64(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+33289, zState+uintptr(n-uint64(7)), uint64(7)) { return _rbuMisuseError(tls) } } @@ -187860,7 +188293,7 @@ func _rbuEditErrmsg(tls *libc.TLS, p uintptr) { if !(uint64(i) < nErrmsg-uint64(8)) { break } - if libc.Xmemcmp(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), __ccgo_ts+31257, uint64(8)) == 0 { + if libc.Xmemcmp(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), __ccgo_ts+31312, uint64(8)) == 0 { nDel = int32(8) for int32(*(*int8)(unsafe.Pointer((*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+libc.Uint32FromInt32(nDel))))) >= int32('0') && int32(*(*int8)(unsafe.Pointer((*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+libc.Uint32FromInt32(nDel))))) <= int32('9') { nDel++ @@ -187888,7 +188321,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) (r int32) { if p != 0 { /* Commit the transaction to the *-oal file. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15051, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15076, uintptr(0), uintptr(0), p+64) } /* Sync the db file if currently doing an incremental checkpoint */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_CKPT) { @@ -187897,7 +188330,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) (r int32) { } _rbuSaveState(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) { - (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15051, uintptr(0), uintptr(0), p+64) + (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15076, uintptr(0), uintptr(0), p+64) } /* Close any open statement handles. */ _rbuObjIterFinalize(tls, p+88) @@ -187907,7 +188340,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) (r int32) { ** specifying the current target and state databases to start a new ** vacuum from scratch. */ if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+33242, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+33297, uintptr(0), uintptr(0), uintptr(0)) if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == int32(SQLITE_DONE) && rc2 != SQLITE_OK { (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -188008,7 +188441,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) (r int32) { } if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15051, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15076, uintptr(0), uintptr(0), uintptr(0)) } } /* Sync the db file */ @@ -188021,19 +188454,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) (r int32) { rc = (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15051, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15076, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - v1 = __ccgo_ts + 15036 + v1 = __ccgo_ts + 15061 } else { - v1 = __ccgo_ts + 33194 + v1 = __ccgo_ts + 33249 } zBegin = v1 rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+33194, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+33249, uintptr(0), uintptr(0), uintptr(0)) } } (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc @@ -188519,7 +188952,7 @@ func _rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) (r int32) { rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxFileSize})))(tls, (*Trbu_file)(unsafe.Pointer(p)).FpReal, pSize) /* If this is an RBU vacuum operation and this is the target database, ** pretend that it has at least one page. Otherwise, SQLite will not - ** check for the existance of a *-wal file. rbuVfsRead() contains + ** check for the existence of a *-wal file. rbuVfsRead() contains ** similar logic. */ if rc == SQLITE_OK && *(*Tsqlite_int64)(unsafe.Pointer(pSize)) == 0 && (*Trbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(p)).FpRbu)).FzTarget == uintptr(0) && (*Trbu_file)(unsafe.Pointer(p)).FopenFlags&int32(SQLITE_OPEN_MAIN_DB) != 0 { *(*Tsqlite_int64)(unsafe.Pointer(pSize)) = int64(1024) @@ -188600,7 +189033,7 @@ func _rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) (r rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{xControl})))(tls, (*Trbu_file)(unsafe.Pointer(p)).FpReal, int32(SQLITE_FCNTL_ZIPVFS), bp) if rc == SQLITE_OK { rc = int32(SQLITE_ERROR) - (*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33269, 0) + (*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33324, 0) } else { if rc == int32(SQLITE_NOTFOUND) { (*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p @@ -188626,7 +189059,7 @@ func _rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) (r if rc == SQLITE_OK && op == int32(SQLITE_FCNTL_VFSNAME) { pRbuVfs = (*Trbu_file)(unsafe.Pointer(p)).FpRbuVfs zIn = *(*uintptr)(unsafe.Pointer(pArg)) - zOut = Xsqlite3_mprintf(tls, __ccgo_ts+33292, libc.VaList(bp+16, (*Trbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + zOut = Xsqlite3_mprintf(tls, __ccgo_ts+33347, libc.VaList(bp+16, (*Trbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = int32(SQLITE_NOMEM) @@ -188821,7 +189254,7 @@ func _rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flag if pDb != 0 { if (*Trbu_file)(unsafe.Pointer(pDb)).FpRbu != 0 && (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == int32(RBU_STAGE_OAL) { if (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FzTarget == uintptr(0) { - zOpen = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, __ccgo_ts+6713) + zOpen = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, __ccgo_ts+6738) zOpen = Xsqlite3_filename_wal(tls, zOpen) } nOpen = libc.Xstrlen(tls, zOpen) @@ -188835,7 +189268,7 @@ func _rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flag } else { (*Trbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Trbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRbu } - if oflags&int32(SQLITE_OPEN_MAIN_DB) != 0 && Xsqlite3_uri_boolean(tls, zName, __ccgo_ts+33303, 0) != 0 { + if oflags&int32(SQLITE_OPEN_MAIN_DB) != 0 && Xsqlite3_uri_boolean(tls, zName, __ccgo_ts+33358, 0) != 0 { oflags = libc.Int32FromInt32(SQLITE_OPEN_TEMP_DB) | libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_CREATE) | libc.Int32FromInt32(SQLITE_OPEN_EXCLUSIVE) | libc.Int32FromInt32(SQLITE_OPEN_DELETEONCLOSE) zOpen = uintptr(0) } @@ -189391,7 +189824,7 @@ func _statConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint _sqlite3TokenInit(tls, bp, *(*uintptr)(unsafe.Pointer(argv + 3*8))) iDb = _sqlite3FindDb(tls, db, bp) if iDb < 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+12380, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+12405, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) return int32(SQLITE_ERROR) } } else { @@ -189891,7 +190324,7 @@ statNextRestart: (*(*TStatPage)(unsafe.Pointer(pCsr + 24))).FiPgno = iRoot (*(*TStatPage)(unsafe.Pointer(pCsr + 24))).FiCell = 0 if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) { - v1 = Xsqlite3_mprintf(tls, __ccgo_ts+33314, 0) + v1 = Xsqlite3_mprintf(tls, __ccgo_ts+33369, 0) z = v1 (*(*TStatPage)(unsafe.Pointer(pCsr + 24))).FzPath = v1 if z == uintptr(0) { @@ -189929,8 +190362,8 @@ statNextRestart: if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) { (*TStatCursor)(unsafe.Pointer(pCsr)).FzName = Xsqlite3_column_text(tls, (*TStatCursor)(unsafe.Pointer(pCsr)).FpStmt, 0) (*TStatCursor)(unsafe.Pointer(pCsr)).FiPageno = *(*Tu32)(unsafe.Pointer((*TStatCell)(unsafe.Pointer(pCell)).FaOvfl + uintptr(iOvfl)*4)) - (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33316 - v2 = Xsqlite3_mprintf(tls, __ccgo_ts+33325, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell, iOvfl)) + (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33371 + v2 = Xsqlite3_mprintf(tls, __ccgo_ts+33380, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell, iOvfl)) z = v2 (*TStatCursor)(unsafe.Pointer(pCsr)).FzPath = v2 if z == uintptr(0) { @@ -189959,7 +190392,7 @@ statNextRestart: (*TStatCursor)(unsafe.Pointer(pCsr)).FiPage++ if (*TStatCursor)(unsafe.Pointer(pCsr)).FiPage >= libc.Int32FromUint64(libc.Uint64FromInt64(2048)/libc.Uint64FromInt64(64)) { _statResetCsr(tls, pCsr) - return _sqlite3CorruptError(tls, int32(226038)) + return _sqlite3CorruptError(tls, int32(227304)) } if (*TStatPage)(unsafe.Pointer(p)).FiCell == (*TStatPage)(unsafe.Pointer(p)).FnCell { (*(*TStatPage)(unsafe.Pointer(p + 1*64))).FiPgno = (*TStatPage)(unsafe.Pointer(p)).FiRightChildPg @@ -189970,7 +190403,7 @@ statNextRestart: (*TStatCursor)(unsafe.Pointer(pCsr)).FnPage++ (*(*TStatPage)(unsafe.Pointer(p + 1*64))).FiCell = 0 if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) { - v4 = Xsqlite3_mprintf(tls, __ccgo_ts+33337, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell)) + v4 = Xsqlite3_mprintf(tls, __ccgo_ts+33392, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell)) z = v4 (*(*TStatPage)(unsafe.Pointer(p + 1*64))).FzPath = v4 if z == uintptr(0) { @@ -189993,13 +190426,13 @@ statNextRestart: case int32(0x05): /* table internal */ fallthrough case int32(0x02): /* index internal */ - (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33345 + (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33400 case int32(0x0D): /* table leaf */ fallthrough case int32(0x0A): /* index leaf */ - (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33354 + (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33409 default: - (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33359 + (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33414 break } *(*int32)(unsafe.Pointer(pCsr + 2108)) += (*TStatPage)(unsafe.Pointer(p1)).FnCell @@ -190008,7 +190441,7 @@ statNextRestart: (*TStatCursor)(unsafe.Pointer(pCsr)).FnMxPayload = (*TStatPage)(unsafe.Pointer(p1)).FnMxPayload } if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) { - v5 = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p1)).FzPath)) + v5 = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p1)).FzPath)) z = v5 (*TStatCursor)(unsafe.Pointer(pCsr)).FzPath = v5 if z == uintptr(0) { @@ -190097,12 +190530,12 @@ func _statFilter(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, a (*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg = uint8(0) } pSql = Xsqlite3_str_new(tls, (*TStatTable)(unsafe.Pointer(pTab)).Fdb) - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33369, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TStatTable)(unsafe.Pointer(pTab)).Fdb)).FaDb + uintptr((*TStatCursor)(unsafe.Pointer(pCsr)).FiDb)*32))).FzDbSName)) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33424, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TStatTable)(unsafe.Pointer(pTab)).Fdb)).FaDb + uintptr((*TStatCursor)(unsafe.Pointer(pCsr)).FiDb)*32))).FzDbSName)) if zName != 0 { - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33524, libc.VaList(bp+8, zName)) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33579, libc.VaList(bp+8, zName)) } if idxNum&int32(0x08) != 0 { - Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33538, 0) + Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33593, 0) } zSql = Xsqlite3_str_finish(tls, pSql) if zSql == uintptr(0) { @@ -190179,7 +190612,7 @@ func _statRowid(tls *libc.TLS, pCursor uintptr, pRowid uintptr) (r int32) { // ** Invoke this routine to register the "dbstat" virtual table module // */ func _sqlite3DbstatRegister(tls *libc.TLS, db uintptr) (r int32) { - return Xsqlite3_create_module(tls, db, __ccgo_ts+33553, uintptr(unsafe.Pointer(&_dbstat_module)), uintptr(0)) + return Xsqlite3_create_module(tls, db, __ccgo_ts+33608, uintptr(unsafe.Pointer(&_dbstat_module)), uintptr(0)) } var _dbstat_module = Tsqlite3_module{} @@ -191473,11 +191906,11 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, *(*uintptr)(unsafe.Pointer(pazDflt)) = uintptr(0) } nThis = _sqlite3Strlen30(tls, zThis) - if nThis == int32(12) && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11771, zThis) { + if nThis == int32(12) && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11796, 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 { /* For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. */ - zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33560, 0) + zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33615, 0) } else { if rc == int32(SQLITE_ERROR) { zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+1665, 0) @@ -191486,7 +191919,7 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, } } } else { - zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33690, libc.VaList(bp+16, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33745, libc.VaList(bp+16, zDb, zThis)) } if !(zPragma != 0) { return int32(SQLITE_NOMEM) @@ -191512,7 +191945,7 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, bRowid = 0 } nDbCol += bRowid - nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Xstrlen(tls, __ccgo_ts+29900))) + nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Xstrlen(tls, __ccgo_ts+29955))) rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp))) if rc == SQLITE_OK { nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Uint64FromInt32(nDbCol)*(libc.Uint64FromInt64(8)*libc.Uint64FromInt32(2)+libc.Uint64FromInt64(4)+libc.Uint64FromInt64(1)+libc.Uint64FromInt32(1)+libc.Uint64FromInt32(1)))) @@ -191536,8 +191969,8 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, } i = 0 if bRowid != 0 { - nName = libc.Xstrlen(tls, __ccgo_ts+29900) - libc.Xmemcpy(tls, pAlloc, __ccgo_ts+29900, nName+uint64(1)) + nName = libc.Xstrlen(tls, __ccgo_ts+29955) + libc.Xmemcpy(tls, pAlloc, __ccgo_ts+29955, nName+uint64(1)) *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)) = pAlloc pAlloc += uintptr(nName + uint64(1)) *(*Tu8)(unsafe.Pointer(abPK + uintptr(i))) = uint8(1) @@ -191601,7 +192034,7 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // /* // ** This function is called to initialize the SessionTable.nCol, azCol[] // ** abPK[] and azDflt[] members of SessionTable object pTab. If these -// ** fields are already initilialized, this function is a no-op. +// ** fields are already initialized, this function is a no-op. // ** // ** If an error occurs, an error code is stored in sqlite3_session.rc and // ** non-zero returned. Or, if no error occurs but the table has no primary @@ -191618,6 +192051,8 @@ func _sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr, db uintptr _, _, _, _ = i, rc, v1, p3 rc = SQLITE_OK if (*TSessionTable)(unsafe.Pointer(pTab)).FnCol == 0 { + Xsqlite3_free(tls, (*TSessionTable)(unsafe.Pointer(pTab)).FazCol) + (*TSessionTable)(unsafe.Pointer(pTab)).FabPK = uintptr(0) if pSession == uintptr(0) || (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbImplicitPK != 0 { v1 = pTab + 28 } else { @@ -191639,7 +192074,7 @@ func _sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr, db uintptr ; i++ } - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11771, (*TSessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11796, (*TSessionTable)(unsafe.Pointer(pTab)).FzName) { (*TSessionTable)(unsafe.Pointer(pTab)).FbStat1 = int32(1) } if pSession != 0 && (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize != 0 { @@ -191934,10 +192369,10 @@ func _sessionPrepareDfltStmt(tls *libc.TLS, db uintptr, pTab uintptr, ppStmt uin _, _, _, _ = ii, zDflt, zSep, v2 *(*TSessionBuffer)(unsafe.Pointer(bp)) = TSessionBuffer{} *(*int32)(unsafe.Pointer(bp + 16)) = SQLITE_OK - zSep = __ccgo_ts + 11391 + zSep = __ccgo_ts + 11416 ii = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) - _sessionAppendPrintf(tls, bp, bp+16, __ccgo_ts+33720, 0) + _sessionAppendPrintf(tls, bp, bp+16, __ccgo_ts+33775, 0) ii = 0 for { if !(ii < (*TSessionTable)(unsafe.Pointer(pTab)).FnCol) { @@ -191949,8 +192384,8 @@ func _sessionPrepareDfltStmt(tls *libc.TLS, db uintptr, pTab uintptr, ppStmt uin v2 = __ccgo_ts + 1666 } zDflt = v2 - _sessionAppendPrintf(tls, bp, bp+16, __ccgo_ts+5143, libc.VaList(bp+32, zSep, zDflt)) - zSep = __ccgo_ts + 15147 + _sessionAppendPrintf(tls, bp, bp+16, __ccgo_ts+5169, libc.VaList(bp+32, zSep, zDflt)) + zSep = __ccgo_ts + 15172 goto _1 _1: ; @@ -192604,8 +193039,8 @@ func _sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr break } if *(*Tu8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33727, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = __ccgo_ts + 22232 + zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33782, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) + zSep = __ccgo_ts + 22304 if zRet == uintptr(0) { break } @@ -192634,8 +193069,8 @@ func _sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uint } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = int32(1) - zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33761, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) - zSep = __ccgo_ts + 33802 + zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33816, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) + zSep = __ccgo_ts + 33857 if zRet == uintptr(0) { break } @@ -192646,7 +193081,7 @@ func _sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uint i++ } if bHave == 0 { - zRet = Xsqlite3_mprintf(tls, __ccgo_ts+1785, 0) + zRet = Xsqlite3_mprintf(tls, __ccgo_ts+1811, 0) } return zRet } @@ -192657,12 +193092,12 @@ func _sessionSelectFindNew(tls *libc.TLS, zDb1 uintptr, zDb2 uintptr, bRowid int var zRet, zSel, v1 uintptr _, _, _ = zRet, zSel, v1 if bRowid != 0 { - v1 = __ccgo_ts + 33807 + v1 = __ccgo_ts + 33862 } else { - v1 = __ccgo_ts + 6718 + v1 = __ccgo_ts + 6743 } zSel = v1 - zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33818, libc.VaList(bp+8, zSel, zDb1, zTbl, zDb2, zTbl, zExpr)) + zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33873, libc.VaList(bp+8, zSel, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } @@ -192723,11 +193158,11 @@ func _sessionAllCols(tls *libc.TLS, zDb uintptr, pTab uintptr) (r uintptr) { break } if zRet != 0 { - v2 = __ccgo_ts + 15147 + v2 = __ccgo_ts + 15172 } else { v2 = __ccgo_ts + 1665 } - zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33897, libc.VaList(bp+8, zRet, v2, zDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer((*TSessionTable)(unsafe.Pointer(pTab)).FazCol + uintptr(ii)*8)))) + zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33952, libc.VaList(bp+8, zRet, v2, zDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer((*TSessionTable)(unsafe.Pointer(pTab)).FazCol + uintptr(ii)*8)))) if !(zRet != 0) { break } @@ -192755,7 +193190,7 @@ func _sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFr } else { z1 = _sessionAllCols(tls, (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb, pTab) z2 = _sessionAllCols(tls, zFrom, pTab) - zStmt = Xsqlite3_mprintf(tls, __ccgo_ts+33916, libc.VaList(bp+16, z1, z2, (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) + zStmt = Xsqlite3_mprintf(tls, __ccgo_ts+33971, libc.VaList(bp+16, z1, z2, (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) || z1 == uintptr(0) || z2 == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { @@ -192784,17 +193219,18 @@ func _sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFr } func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) (r int32) { - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(80) + defer tls.Free(80) var bHasPk, bMismatch, i, rc int32 - var db, zDb, zExpr, v1 uintptr + var db, zDb, zDbExists, zExpr, v1 uintptr var _ /* abPK at bp+32 */ uintptr var _ /* azCol at bp+40 */ uintptr var _ /* bRowid at bp+28 */ int32 var _ /* d at bp+0 */ TSessionDiffCtx var _ /* nCol at bp+24 */ int32 + var _ /* pDbExists at bp+48 */ uintptr var _ /* pTo at bp+16 */ uintptr - _, _, _, _, _, _, _, _ = bHasPk, bMismatch, db, i, rc, zDb, zExpr, v1 + _, _, _, _, _, _, _, _, _ = bHasPk, bMismatch, db, i, rc, zDb, zDbExists, zExpr, v1 zDb = (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb rc = (*Tsqlite3_session)(unsafe.Pointer(pSession)).Frc libc.Xmemset(tls, bp, 0, uint64(16)) @@ -192807,7 +193243,9 @@ func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl u zExpr = uintptr(0) db = (*Tsqlite3_session)(unsafe.Pointer(pSession)).Fdb /* Table zTbl */ /* Locate and if necessary initialize the target table object */ + (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach++ rc = _sessionFindTable(tls, pSession, zTbl, bp+16) + (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach-- if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) { goto diff_out } @@ -192818,18 +193256,44 @@ func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl u /* Check the table schemas match */ if rc == SQLITE_OK { bHasPk = 0 - bMismatch = 0 /* Columns in zFrom.zTbl */ + bMismatch = 0 + *(*int32)(unsafe.Pointer(bp + 24)) = 0 /* Columns in zFrom.zTbl */ *(*int32)(unsafe.Pointer(bp + 28)) = 0 + *(*uintptr)(unsafe.Pointer(bp + 32)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = uintptr(0) - if (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbImplicitPK != 0 { - v1 = bp + 28 + zDbExists = uintptr(0) + /* Check that database zFrom is attached. */ + zDbExists = Xsqlite3_mprintf(tls, __ccgo_ts+34028, libc.VaList(bp+64, zFrom)) + if zDbExists == uintptr(0) { + rc = int32(SQLITE_NOMEM) } else { - v1 = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 48)) = uintptr(0) + rc = Xsqlite3_prepare_v2(tls, db, zDbExists, -int32(1), bp+48, uintptr(0)) + if rc == int32(SQLITE_ERROR) { + rc = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 24)) = -int32(1) + } + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 48))) + Xsqlite3_free(tls, zDbExists) + } + if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 24)) == 0 { + if (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbImplicitPK != 0 { + v1 = bp + 28 + } else { + v1 = uintptr(0) + } + rc = _sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+24, uintptr(0), uintptr(0), bp+40, uintptr(0), uintptr(0), bp+32, v1) } - rc = _sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+24, uintptr(0), uintptr(0), bp+40, uintptr(0), uintptr(0), bp+32, v1) if rc == SQLITE_OK { if (*TSessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FnCol != *(*int32)(unsafe.Pointer(bp + 24)) { - bMismatch = int32(1) + if *(*int32)(unsafe.Pointer(bp + 24)) <= 0 { + rc = int32(SQLITE_SCHEMA) + if pzErrMsg != 0 { + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+34059, libc.VaList(bp+64, zFrom, zTbl)) + } + } else { + bMismatch = int32(1) + } } else { i = 0 for { @@ -192855,7 +193319,7 @@ func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl u Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 40))) if bMismatch != 0 { if pzErrMsg != 0 { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+33973, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+34080, 0) } rc = int32(SQLITE_SCHEMA) } @@ -193187,7 +193651,7 @@ func _sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { bp := tls.Alloc(48) defer tls.Free(48) var _ /* aBuf at bp+0 */ [24]int8 - Xsqlite3_snprintf(tls, libc.Int32FromUint64(libc.Uint64FromInt64(24)-libc.Uint64FromInt32(1)), bp, __ccgo_ts+5205, libc.VaList(bp+32, iVal)) + Xsqlite3_snprintf(tls, libc.Int32FromUint64(libc.Uint64FromInt64(24)-libc.Uint64FromInt32(1)), bp, __ccgo_ts+5231, libc.VaList(bp+32, iVal)) _sessionAppendStr(tls, p, bp, pRc) } @@ -193487,12 +193951,12 @@ func _sessionSelectStmt(tls *libc.TLS, db uintptr, bIgnoreNoop int32, zDb uintpt *(*TSessionBuffer)(unsafe.Pointer(bp + 24)) = TSessionBuffer{} *(*TSessionBuffer)(unsafe.Pointer(bp + 40)) = TSessionBuffer{} *(*TSessionBuffer)(unsafe.Pointer(bp + 56)) = TSessionBuffer{} - _sessionAppendStr(tls, bp+24, __ccgo_ts+34000, bp) - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11771, zTab) { - _sessionAppendStr(tls, bp+24, __ccgo_ts+34004, bp) - _sessionAppendStr(tls, bp+40, __ccgo_ts+34028, bp) - _sessionAppendStr(tls, bp+56, __ccgo_ts+34037, bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34082, bp) + _sessionAppendStr(tls, bp+24, __ccgo_ts+34107, bp) + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11796, zTab) { + _sessionAppendStr(tls, bp+24, __ccgo_ts+34111, bp) + _sessionAppendStr(tls, bp+40, __ccgo_ts+34135, bp) + _sessionAppendStr(tls, bp+56, __ccgo_ts+34144, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34189, bp) } else { i = 0 for { @@ -193500,17 +193964,17 @@ func _sessionSelectStmt(tls *libc.TLS, db uintptr, bIgnoreNoop int32, zDb uintpt break } if (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FnBuf != 0 { - _sessionAppendStr(tls, bp+8, __ccgo_ts+15147, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+15172, bp) } _sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp) if *(*Tu8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { _sessionAppendStr(tls, bp+40, zSep, bp) _sessionAppendStr(tls, bp+56, zSep, bp) - zSep = __ccgo_ts + 15147 + zSep = __ccgo_ts + 15172 _sessionAppendIdent(tls, bp+40, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp) - _sessionAppendPrintf(tls, bp+56, bp, __ccgo_ts+34096, libc.VaList(bp+80, i+int32(1))) + _sessionAppendPrintf(tls, bp+56, bp, __ccgo_ts+34203, libc.VaList(bp+80, i+int32(1))) } else { - _sessionAppendPrintf(tls, bp+24, bp, __ccgo_ts+34100, libc.VaList(bp+80, i+int32(1)+nCol, i+int32(1), zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) + _sessionAppendPrintf(tls, bp+24, bp, __ccgo_ts+34207, libc.VaList(bp+80, i+int32(1)+nCol, i+int32(1), zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)))) } goto _1 _1: @@ -193524,7 +193988,7 @@ func _sessionSelectStmt(tls *libc.TLS, db uintptr, bIgnoreNoop int32, zDb uintpt } else { v2 = __ccgo_ts + 1665 } - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+34127, libc.VaList(bp+80, (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FaBuf, v2, zDb, zTab, (*(*TSessionBuffer)(unsafe.Pointer(bp + 40))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 56))).FaBuf)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+34234, libc.VaList(bp+80, (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FaBuf, v2, zDb, zTab, (*(*TSessionBuffer)(unsafe.Pointer(bp + 40))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 56))).FaBuf)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM) } @@ -193666,7 +194130,7 @@ func _sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Tsqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Tsqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_exec(tls, (*Tsqlite3_session)(unsafe.Pointer(pSession)).Fdb, __ccgo_ts+34169, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 16)) = Xsqlite3_exec(tls, (*Tsqlite3_session)(unsafe.Pointer(pSession)).Fdb, __ccgo_ts+34276, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 16)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 16)) } @@ -193772,7 +194236,7 @@ func _sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } } Xsqlite3_free(tls, (*(*TSessionBuffer)(unsafe.Pointer(bp))).FaBuf) - Xsqlite3_exec(tls, db, __ccgo_ts+34189, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, __ccgo_ts+34296, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 16)) } @@ -194027,13 +194491,14 @@ func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, func _sessionDiscardData(tls *libc.TLS, pIn uintptr) { var nMove int32 _ = nMove - if (*TSessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*TSessionInput)(unsafe.Pointer(pIn)).FiNext >= _sessions_strm_chunk_size { - nMove = (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*TSessionInput)(unsafe.Pointer(pIn)).FiNext + if (*TSessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent >= _sessions_strm_chunk_size { + nMove = (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent if nMove > 0 { - libc.Xmemmove(tls, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf+uintptr((*TSessionInput)(unsafe.Pointer(pIn)).FiNext), libc.Uint64FromInt32(nMove)) + libc.Xmemmove(tls, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf+uintptr((*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent), libc.Uint64FromInt32(nMove)) } - (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf -= (*TSessionInput)(unsafe.Pointer(pIn)).FiNext - (*TSessionInput)(unsafe.Pointer(pIn)).FiNext = 0 + (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf -= (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent + *(*int32)(unsafe.Pointer(pIn + 8)) -= (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent + (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent = 0 (*TSessionInput)(unsafe.Pointer(pIn)).FnData = (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf } } @@ -194189,7 +194654,7 @@ func _sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, ap rc = _sessionInputBuffer(tls, pIn, int32(9)) if rc == SQLITE_OK { if (*TSessionInput)(unsafe.Pointer(pIn)).FiNext >= (*TSessionInput)(unsafe.Pointer(pIn)).FnData { - rc = _sqlite3CorruptError(tls, int32(230294)) + rc = _sqlite3CorruptError(tls, int32(231591)) } else { v3 = pIn + 8 v2 = *(*int32)(unsafe.Pointer(v3)) @@ -194213,7 +194678,7 @@ func _sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, ap rc = _sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*TSessionInput)(unsafe.Pointer(pIn)).FnData-(*TSessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = _sqlite3CorruptError(tls, int32(230314)) + rc = _sqlite3CorruptError(tls, int32(231611)) } else { if eType == int32(SQLITE_TEXT) { v4 = int32(SQLITE_UTF8) @@ -194228,7 +194693,7 @@ func _sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, ap } if eType == int32(SQLITE_INTEGER) || eType == int32(SQLITE_FLOAT) { if (*TSessionInput)(unsafe.Pointer(pIn)).FnData-(*TSessionInput)(unsafe.Pointer(pIn)).FiNext < int32(8) { - rc = _sqlite3CorruptError(tls, int32(230324)) + rc = _sqlite3CorruptError(tls, int32(231621)) } else { *(*Tsqlite3_int64)(unsafe.Pointer(bp + 8)) = _sessionGetI64(tls, aVal) if eType == int32(SQLITE_INTEGER) { @@ -194284,7 +194749,7 @@ func _sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) ( ** large value for nCol may cause nRead to wrap around and become ** negative. Leading to a crash. */ if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > int32(65536) { - rc = _sqlite3CorruptError(tls, int32(230372)) + rc = _sqlite3CorruptError(tls, int32(231669)) } else { rc = _sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+int32(100)) nRead += *(*int32)(unsafe.Pointer(bp)) @@ -194389,7 +194854,7 @@ func _sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) (r int32) { (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 _sessionBufferGrow(tls, p+72, int64(nByte), bp) } else { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(230460)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(231757)) } } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { @@ -194460,8 +194925,8 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK { return (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc } - _sessionDiscardData(tls, p) (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiCurrent = (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext + _sessionDiscardData(tls, p) /* If the iterator is already at the end of the changeset, return DONE. */ if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext >= (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FnData { return int32(SQLITE_DONE) @@ -194495,7 +194960,7 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab == uintptr(0) || (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 && (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 { /* The first record in the changeset is not a table header. Must be a ** corrupt changeset. */ - v7 = _sqlite3CorruptError(tls, int32(230546)) + v7 = _sqlite3CorruptError(tls, int32(231843)) (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = v7 return v7 } @@ -194505,7 +194970,7 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin *(*int32)(unsafe.Pointer(v9))++ (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(v8)))) if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != int32(SQLITE_UPDATE) && (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != int32(SQLITE_DELETE) && (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != int32(SQLITE_INSERT) { - v10 = _sqlite3CorruptError(tls, int32(230552)) + v10 = _sqlite3CorruptError(tls, int32(231849)) (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = v10 return v10 } @@ -194584,7 +195049,7 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin if *(*Tu8)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)) if *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) { - v16 = _sqlite3CorruptError(tls, int32(230596)) + v16 = _sqlite3CorruptError(tls, int32(231893)) (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = v16 return v16 } @@ -194994,7 +195459,7 @@ func _sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOu goto finished_invert } default: - *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(230961)) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(232258)) goto finished_invert } if xOutput != 0 && (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FnBuf >= _sessions_strm_chunk_size { @@ -195197,7 +195662,7 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32 } if pUp == uintptr(0) { nByte = libc.Int32FromUint64(uint64(24) * libc.Uint64FromInt32(nU32) * uint64(4)) - bStat1 = libc.BoolInt32(Xsqlite3_stricmp(tls, (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, __ccgo_ts+11771) == 0) + bStat1 = libc.BoolInt32(Xsqlite3_stricmp(tls, (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, __ccgo_ts+11796) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM) @@ -195206,9 +195671,9 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32 libc.Xmemset(tls, bp+8, 0, uint64(16)) (*TSessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*24 libc.Xmemcpy(tls, (*TSessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*TSessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, libc.Uint64FromInt32(nU32)*uint64(4)) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34207, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34314, bp) _sessionAppendIdent(tls, bp+8, (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34220, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34327, bp) /* Create the assignments part of the UPDATE */ ii = 0 for { @@ -195218,9 +195683,9 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32 if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*8)) != 0 { _sessionAppendStr(tls, bp+8, zSep, bp) _sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34226, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34333, bp) _sessionAppendInteger(tls, bp+8, ii*int32(2)+int32(1), bp) - zSep = __ccgo_ts + 15147 + zSep = __ccgo_ts + 15172 } goto _2 _2: @@ -195229,7 +195694,7 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32 } /* Create the WHERE clause part of the UPDATE */ zSep = __ccgo_ts + 1665 - _sessionAppendStr(tls, bp+8, __ccgo_ts+34231, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34338, bp) ii = 0 for { if !(ii < (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) { @@ -195238,13 +195703,13 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32 if *(*Tu8)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*8)) != 0 { _sessionAppendStr(tls, bp+8, zSep, bp) if bStat1 != 0 && ii == int32(1) { - _sessionAppendStr(tls, bp+8, __ccgo_ts+34239, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34346, bp) } else { _sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34314, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34421, bp) _sessionAppendInteger(tls, bp+8, ii*int32(2)+int32(2), bp) } - zSep = __ccgo_ts + 22232 + zSep = __ccgo_ts + 22304 } goto _3 _3: @@ -195331,9 +195796,9 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in *(*int32)(unsafe.Pointer(bp)) = SQLITE_OK *(*TSessionBuffer)(unsafe.Pointer(bp + 8)) = TSessionBuffer{} nPk = 0 - _sessionAppendStr(tls, bp+8, __ccgo_ts+34320, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34427, bp) _sessionAppendIdent(tls, bp+8, zTab, bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34231, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34338, bp) i = 0 for { if !(i < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol) { @@ -195343,9 +195808,9 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in nPk++ _sessionAppendStr(tls, bp+8, zSep, bp) _sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34226, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34333, bp) _sessionAppendInteger(tls, bp+8, i+int32(1), bp) - zSep = __ccgo_ts + 22232 + zSep = __ccgo_ts + 22304 } goto _1 _1: @@ -195353,9 +195818,9 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in i++ } if nPk < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol { - _sessionAppendStr(tls, bp+8, __ccgo_ts+34338, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34445, bp) _sessionAppendInteger(tls, bp+8, (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol+int32(1), bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+33802, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+33857, bp) zSep = __ccgo_ts + 1665 i = 0 for { @@ -195365,16 +195830,16 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in if !(*(*Tu8)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0) { _sessionAppendStr(tls, bp+8, zSep, bp) _sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+34314, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34421, bp) _sessionAppendInteger(tls, bp+8, i+int32(1), bp) - zSep = __ccgo_ts + 34346 + zSep = __ccgo_ts + 34453 } goto _2 _2: ; i++ } - _sessionAppendStr(tls, bp+8, __ccgo_ts+5173, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+5199, bp) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v2(tls, db, (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FnBuf, p+8, uintptr(0)) @@ -195400,7 +195865,7 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in // */ func _sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r int32) { /* TODO */ - return _sessionSelectStmt(tls, db, libc.Int32FromUint8((*TSessionApplyCtx)(unsafe.Pointer(p)).FbIgnoreNoop), __ccgo_ts+6713, zTab, (*TSessionApplyCtx)(unsafe.Pointer(p)).FbRowid, (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) + return _sessionSelectStmt(tls, db, libc.Int32FromUint8((*TSessionApplyCtx)(unsafe.Pointer(p)).FbIgnoreNoop), __ccgo_ts+6738, zTab, (*TSessionApplyCtx)(unsafe.Pointer(p)).FbRowid, (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+24) } // C documentation @@ -195423,16 +195888,16 @@ func _sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in _ = i *(*int32)(unsafe.Pointer(bp)) = SQLITE_OK *(*TSessionBuffer)(unsafe.Pointer(bp + 8)) = TSessionBuffer{} - _sessionAppendStr(tls, bp+8, __ccgo_ts+34351, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34458, bp) _sessionAppendIdent(tls, bp+8, zTab, bp) - _sessionAppendStr(tls, bp+8, __ccgo_ts+22238, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+22310, bp) i = 0 for { if !(i < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol) { break } if i != 0 { - _sessionAppendStr(tls, bp+8, __ccgo_ts+15147, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+15172, bp) } _sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp) goto _1 @@ -195440,19 +195905,19 @@ func _sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in ; i++ } - _sessionAppendStr(tls, bp+8, __ccgo_ts+34369, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34476, bp) i = int32(1) for { if !(i < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol) { break } - _sessionAppendStr(tls, bp+8, __ccgo_ts+34380, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+34487, bp) goto _2 _2: ; i++ } - _sessionAppendStr(tls, bp+8, __ccgo_ts+5173, bp) + _sessionAppendStr(tls, bp+8, __ccgo_ts+5199, bp) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v2(tls, db, (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 8))).FnBuf, p+16, uintptr(0)) } @@ -195475,12 +195940,12 @@ func _sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) (r int func _sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) (r int32) { var rc int32 _ = rc - rc = _sessionSelectRow(tls, db, __ccgo_ts+11771, p) + rc = _sessionSelectRow(tls, db, __ccgo_ts+11796, p) if rc == SQLITE_OK { - rc = _sessionPrepare(tls, db, p+16, __ccgo_ts+34384) + rc = _sessionPrepare(tls, db, p+16, __ccgo_ts+34491) } if rc == SQLITE_OK { - rc = _sessionPrepare(tls, db, p+8, __ccgo_ts+34497) + rc = _sessionPrepare(tls, db, p+8, __ccgo_ts+34604) } return rc } @@ -195546,7 +196011,7 @@ func _sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, a if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { /* The value in the changeset was "undefined". This indicates a ** corrupt changeset blob. */ - rc = _sqlite3CorruptError(tls, int32(231443)) + rc = _sqlite3CorruptError(tls, int32(232740)) } else { rc = _sessionBindValue(tls, pStmt, i+int32(1), *(*uintptr)(unsafe.Pointer(bp))) } @@ -195962,7 +196427,7 @@ func _sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply rc = _sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else { if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, __ccgo_ts+34641, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, __ccgo_ts+34748, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = _sessionBindRow(tls, pIter, __ccgo_fp(Xsqlite3changeset_new), (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FnCol, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FabPK, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete) Xsqlite3_bind_int(tls, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FnCol+int32(1), int32(1)) @@ -195975,7 +196440,7 @@ func _sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply rc = _sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, __ccgo_ts+34662, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, __ccgo_ts+34769, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -196075,10 +196540,10 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FbInvertConstraints = libc.BoolInt32(!!(flags&libc.Int32FromInt32(SQLITE_CHANGESETAPPLY_INVERT) != 0)) (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FbIgnoreNoop = libc.BoolUint8(!!(flags&libc.Int32FromInt32(SQLITE_CHANGESETAPPLY_IGNORENOOP) != 0)) if flags&int32(SQLITE_CHANGESETAPPLY_NOSAVEPOINT) == 0 { - rc = Xsqlite3_exec(tls, db, __ccgo_ts+34681, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, __ccgo_ts+34788, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, __ccgo_ts+34707, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, __ccgo_ts+34814, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3changeset_next(tls, pIter) { Xsqlite3changeset_op(tls, pIter, bp+144, bp+136, bp+140, uintptr(0)) @@ -196109,7 +196574,7 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui ** non-zero, proceed. */ schemaMismatch = libc.BoolInt32(xFilter != 0 && 0 == (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{xFilter})))(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 144)))) if schemaMismatch != 0 { - *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp + 144)))) + *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp + 144)))) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { rc = int32(SQLITE_NOMEM) break @@ -196119,7 +196584,7 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui } else { nMinCol = 0 Xsqlite3changeset_pk(tls, pIter, bp+152, uintptr(0)) - rc = _sessionTableInfo(tls, uintptr(0), db, __ccgo_ts+6713, *(*uintptr)(unsafe.Pointer(bp + 144)), bp+8+32, uintptr(0), bp, bp+8+40, uintptr(0), uintptr(0), bp+8+48, bp+8+124) + rc = _sessionTableInfo(tls, uintptr(0), db, __ccgo_ts+6738, *(*uintptr)(unsafe.Pointer(bp + 144)), bp+8+32, uintptr(0), bp, bp+8+40, uintptr(0), uintptr(0), bp+8+48, bp+8+124) if rc != SQLITE_OK { break } @@ -196138,18 +196603,18 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui } if (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FnCol == 0 { schemaMismatch = int32(1) - Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34737, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp)))) + Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34844, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp)))) } else { if (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FnCol < *(*int32)(unsafe.Pointer(bp + 136)) { schemaMismatch = int32(1) - Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34781, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp)), (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FnCol, *(*int32)(unsafe.Pointer(bp + 136)))) + Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34888, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp)), (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FnCol, *(*int32)(unsafe.Pointer(bp + 136)))) } else { if *(*int32)(unsafe.Pointer(bp + 136)) < nMinCol || libc.Xmemcmp(tls, (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FabPK, *(*uintptr)(unsafe.Pointer(bp + 152)), libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 136)))) != 0 { schemaMismatch = int32(1) - Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34852, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp)))) + Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34959, libc.VaList(bp+328, *(*uintptr)(unsafe.Pointer(bp)))) } else { (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FnCol = *(*int32)(unsafe.Pointer(bp + 136)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+11771) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+11796) { v2 = _sessionStat1Sql(tls, db, bp+8) rc = v2 if v2 != 0 { @@ -196206,17 +196671,17 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui } } } - rc2 = Xsqlite3_exec(tls, db, __ccgo_ts+34912, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, db, __ccgo_ts+35019, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = rc2 } if flags&int32(SQLITE_CHANGESETAPPLY_NOSAVEPOINT) == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, __ccgo_ts+34942, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, __ccgo_ts+35049, uintptr(0), uintptr(0), uintptr(0)) } if rc != SQLITE_OK { - Xsqlite3_exec(tls, db, __ccgo_ts+34966, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, __ccgo_ts+34942, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, __ccgo_ts+35073, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, __ccgo_ts+35049, uintptr(0), uintptr(0), uintptr(0)) } } if rc == SQLITE_OK && bPatchset == 0 && (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 8))).FbRebase != 0 { @@ -196992,7 +197457,7 @@ func Xsqlite3changegroup_schema(tls *libc.TLS, pGrp uintptr, db uintptr, zDb uin ** or after sqlite3changegroup_schema() has already been called. */ rc = int32(SQLITE_MISUSE) } else { - (*Tsqlite3_changegroup)(unsafe.Pointer(pGrp)).FzDb = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+8, zDb)) + (*Tsqlite3_changegroup)(unsafe.Pointer(pGrp)).FzDb = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+8, zDb)) if (*Tsqlite3_changegroup)(unsafe.Pointer(pGrp)).FzDb == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { @@ -197028,11 +197493,17 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // ** Add a single change to a changeset-group. // */ func Xsqlite3changegroup_add_change(tls *libc.TLS, pGrp uintptr, pIter uintptr) (r int32) { + var rc int32 + _ = rc + rc = SQLITE_OK if (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent == (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiNext || (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Frc != SQLITE_OK || (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbInvert != 0 { /* Iterator does not point to any valid entry or is an INVERT iterator. */ - return int32(SQLITE_ERROR) + rc = int32(SQLITE_ERROR) + } else { + (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FbNoDiscard = int32(1) + rc = _sessionOneChangeToHash(tls, pGrp, pIter, 0) } - return _sessionOneChangeToHash(tls, pGrp, pIter, 0) + return rc } // C documentation @@ -197617,6 +198088,7 @@ func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) (r int32) { /* #include <string.h> */ /* #include <assert.h> */ +/* #include <stddef.h> */ /* Truncate very long tokens to this many bytes. Hard limit is ** (65536-1-1-4-9)==65521 bytes. The limiting factor is the 16-bit offset @@ -197662,8 +198134,7 @@ type TFts5Global = struct { type Fts5Global = TFts5Global type TFts5Colset = struct { - FnCol int32 - FaiCol [1]int32 + FnCol int32 } type Fts5Colset = TFts5Colset @@ -197675,12 +198146,13 @@ type Fts5Colset = TFts5Colset ** This object is used by fts5_expr.c and fts5_index.c. */ type TFts5Colset1 = struct { - FnCol int32 - FaiCol [1]int32 + FnCol int32 } type Fts5Colset1 = TFts5Colset1 +/* Size (int bytes) of a complete Fts5Colset object with N columns. */ + /************************************************************************** ** Interface to code in fts5_config.c. fts5_config.c contains contains code ** to parse the arguments passed to the CREATE VIRTUAL TABLE statement. @@ -198057,7 +198529,6 @@ type TFts5ExprNode = struct { FiRowid Ti64 FpNear uintptr FnChild int32 - FapChild [1]uintptr } type Fts5ExprNode = TFts5ExprNode @@ -198085,16 +198556,14 @@ type TFts5ExprPhrase = struct { FpNode uintptr Fposlist TFts5Buffer FnTerm int32 - FaTerm [1]TFts5ExprTerm } type Fts5ExprPhrase = TFts5ExprPhrase type TFts5ExprNearset = struct { - FnNear int32 - FpColset uintptr - FnPhrase int32 - FapPhrase [1]uintptr + FnNear int32 + FpColset uintptr + FnPhrase int32 } type Fts5ExprNearset = TFts5ExprNearset @@ -198136,7 +198605,7 @@ type Fts5PoslistPopulator = TFts5PoslistPopulator ** ** The "lemon" program processes an LALR(1) input grammar file, then uses ** this template to construct a parser. The "lemon" program inserts text -** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the +** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the ** interstitial "-" characters) contained in this template is changed into ** the value of the %name directive from the grammar. Otherwise, the content ** of this template is copied straight through into the generate parser @@ -198940,7 +199409,7 @@ func _fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+34994, 0) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35101, 0) /******** End %stack_overflow code ********************************************/ (*Tfts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse /* Suppress warning about unused %extra_argument var */ } @@ -199296,7 +199765,7 @@ func _fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int3 pParse = (*Tfts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse /************ Begin %syntax_error code ****************************************/ _ = fts5yymajor /* Silence a compiler warning */ - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35022, libc.VaList(bp+8, fts5yyminor.Fn, fts5yyminor.Fp)) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35129, libc.VaList(bp+8, fts5yyminor.Fn, fts5yyminor.Fp)) /************ End %syntax_error code ******************************************/ (*Tfts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse /* Suppress warning about unused %extra_argument variable */ } @@ -199594,7 +200063,7 @@ func _fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n in if n < 0 { n = libc.Int32FromUint64(libc.Xstrlen(tls, z)) } - (*THighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, __ccgo_ts+35053, libc.VaList(bp+8, (*THighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*THighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, __ccgo_ts+35160, libc.VaList(bp+8, (*THighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*THighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = int32(SQLITE_NOMEM) } @@ -199693,7 +200162,7 @@ func _fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uint var _ /* rc at bp+104 */ int32 _, _ = iCol, zErr if nVal != int32(3) { - zErr = __ccgo_ts + 35060 + zErr = __ccgo_ts + 35167 Xsqlite3_result_error(tls, pCtx, zErr, -int32(1)) return } @@ -199948,7 +200417,7 @@ func _fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintpt nBestScore = 0 /* Score of best snippet */ *(*int32)(unsafe.Pointer(bp + 112)) = 0 if nVal != int32(5) { - zErr = __ccgo_ts + 35110 + zErr = __ccgo_ts + 35217 Xsqlite3_result_error(tls, pCtx, zErr, -int32(1)) return } @@ -200219,7 +200688,7 @@ func _fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) ** under consideration. ** ** The problem with this is that if (N < 2*nHit), the IDF is - ** negative. Which is undesirable. So the mimimum allowable IDF is + ** negative. Which is undesirable. So the minimum allowable IDF is ** (1e-6) - roughly the same as a term that appears in just over ** half of set of 5,000,000 documents. */ idf = libc.Xlog(tls, (float64(*(*Tsqlite3_int64)(unsafe.Pointer(bp))-*(*Tsqlite3_int64)(unsafe.Pointer(bp + 16)))+float64(0.5))/(float64(*(*Tsqlite3_int64)(unsafe.Pointer(bp + 16)))+float64(0.5))) @@ -200343,13 +200812,13 @@ func _fts5GetLocaleFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uint *(*int32)(unsafe.Pointer(bp + 8)) = 0 /* xColumnLocale() must be available */ if nVal != int32(1) { - z = __ccgo_ts + 35158 + z = __ccgo_ts + 35265 Xsqlite3_result_error(tls, pCtx, z, -int32(1)) return } eType = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(apVal))) if eType != int32(SQLITE_INTEGER) { - z1 = __ccgo_ts + 35214 + z1 = __ccgo_ts + 35321 Xsqlite3_result_error(tls, pCtx, z1, -int32(1)) return } @@ -200382,19 +200851,19 @@ func _sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) (r int32) { FxDestroy uintptr }{ 0: { - FzFunc: __ccgo_ts + 35272, + FzFunc: __ccgo_ts + 35379, FxFunc: __ccgo_fp(_fts5SnippetFunction), }, 1: { - FzFunc: __ccgo_ts + 35280, + FzFunc: __ccgo_ts + 35387, FxFunc: __ccgo_fp(_fts5HighlightFunction), }, 2: { - FzFunc: __ccgo_ts + 35290, + FzFunc: __ccgo_ts + 35397, FxFunc: __ccgo_fp(_fts5Bm25Function), }, 3: { - FzFunc: __ccgo_ts + 35295, + FzFunc: __ccgo_ts + 35402, FxFunc: __ccgo_fp(_fts5GetLocaleFunction), }, } @@ -200782,7 +201251,7 @@ func _sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) (r // ** * The 52 upper and lower case ASCII characters, and // ** * The 10 integer ASCII characters. // ** * The underscore character "_" (0x5F). -// ** * The unicode "subsitute" character (0x1A). +// ** * The unicode "substitute" character (0x1A). // */ func _sqlite3Fts5IsBareword(tls *libc.TLS, t int8) (r int32) { var aBareword [128]Tu8 @@ -201258,7 +201727,7 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg _, _, _, _, _, _, _, _, _, _, _ = azArg, bFirst, nArg, nByte, nCmd, nPre, p, p1, p2, pSpace, v2 *(*int32)(unsafe.Pointer(bp)) = SQLITE_OK nCmd = libc.Int32FromUint64(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, __ccgo_ts+35311, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35418, zCmd, nCmd) == 0 { nByte = libc.Int32FromUint64(libc.Uint64FromInt64(4) * libc.Uint64FromInt32(FTS5_MAX_PREFIX_INDEXES)) bFirst = int32(1) if (*TFts5Config)(unsafe.Pointer(pConfig)).FaPrefix == uintptr(0) { @@ -201284,12 +201753,12 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg } } if int32(*(*int8)(unsafe.Pointer(p))) < int32('0') || int32(*(*int8)(unsafe.Pointer(p))) > int32('9') { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35318, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35425, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) break } if (*TFts5Config)(unsafe.Pointer(pConfig)).FnPrefix == int32(FTS5_MAX_PREFIX_INDEXES) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35349, libc.VaList(bp+80, int32(FTS5_MAX_PREFIX_INDEXES))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35456, libc.VaList(bp+80, int32(FTS5_MAX_PREFIX_INDEXES))) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) break } @@ -201298,7 +201767,7 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg p++ } if nPre <= 0 || nPre >= int32(1000) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35382, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35489, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) break } @@ -201308,14 +201777,14 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35419, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35526, zCmd, nCmd) == 0 { p1 = zArg nArg = libc.Int64FromUint64(libc.Xstrlen(tls, zArg) + uint64(1)) azArg = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint64(uint64(libc.Uint64FromInt64(8)+libc.Uint64FromInt32(2))*libc.Uint64FromInt64(nArg))) if azArg != 0 { pSpace = azArg + uintptr(nArg)*8 if (*TFts5Config)(unsafe.Pointer(pConfig)).Ft.FazArg != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35428, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35535, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { nArg = 0 @@ -201342,7 +201811,7 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg nArg++ } if p1 == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35461, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35568, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).Ft.FazArg = azArg @@ -201354,76 +201823,76 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg Xsqlite3_free(tls, azArg) return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35495, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35602, zCmd, nCmd) == 0 { if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35503, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35610, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent = int32(FTS5_CONTENT_EXTERNAL) - (*TFts5Config)(unsafe.Pointer(pConfig)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+35535, libc.VaList(bp+80, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*TFts5Config)(unsafe.Pointer(pConfig)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+35642, libc.VaList(bp+80, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent = int32(FTS5_CONTENT_NONE) } } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35541, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35648, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35560, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35667, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1')) } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35603, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35710, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35560, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35667, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessUnindexed = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1')) } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35625, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35732, zCmd, nCmd) == 0 { if (*TFts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35639, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35746, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = _sqlite3Fts5Strndup(tls, bp, zArg, -int32(1)) } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35677, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35784, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35688, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35795, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1')) } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35723, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35830, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35730, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35837, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FbLocale = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1')) } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+5582, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+5608, zCmd, nCmd) == 0 { *(*[4]TFts5Enum)(unsafe.Pointer(bp + 8)) = [4]TFts5Enum{ 0: { - FzName: __ccgo_ts + 8407, + FzName: __ccgo_ts + 8432, FeVal: int32(FTS5_DETAIL_NONE), }, 1: { - FzName: __ccgo_ts + 17901, + FzName: __ccgo_ts + 17973, }, 2: { - FzName: __ccgo_ts + 35761, + FzName: __ccgo_ts + 35868, FeVal: int32(FTS5_DETAIL_COLUMNS), }, 3: {}, @@ -201431,20 +201900,20 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg v2 = _fts5ConfigSetEnum(tls, bp+8, zArg, pConfig+116) *(*int32)(unsafe.Pointer(bp)) = v2 if v2 != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35769, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35876, 0) } return *(*int32)(unsafe.Pointer(bp)) } - if Xsqlite3_strnicmp(tls, __ccgo_ts+35800, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, __ccgo_ts+35907, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35810, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35917, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FbTokendata = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1')) } return *(*int32)(unsafe.Pointer(bp)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35844, libc.VaList(bp+80, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35951, libc.VaList(bp+80, nCmd, zCmd)) return int32(SQLITE_ERROR) } @@ -201505,16 +201974,16 @@ func _fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr var v2 uintptr _, _, _ = rc, v1, v2 rc = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+35872) || 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+16848) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35877, libc.VaList(bp+8, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+35979) || 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+16920) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35984, libc.VaList(bp+8, zCol)) rc = int32(SQLITE_ERROR) } else { if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, __ccgo_ts+35907) { + if 0 == Xsqlite3_stricmp(tls, zArg, __ccgo_ts+36014) { *(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*TFts5Config)(unsafe.Pointer(p)).FnCol))) = uint8(1) *(*int32)(unsafe.Pointer(pbUnindexed)) = int32(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35917, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36024, libc.VaList(bp+8, zArg)) rc = int32(SQLITE_ERROR) } } @@ -201540,7 +202009,7 @@ func _fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) (r int32) { _ = i *(*int32)(unsafe.Pointer(bp)) = SQLITE_OK *(*TFts5Buffer)(unsafe.Pointer(bp + 8)) = TFts5Buffer{} - _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+35948, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(p)).FzContentRowid)) + _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+36055, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*TFts5Config)(unsafe.Pointer(p)).FeContent != int32(FTS5_CONTENT_NONE) { i = 0 for { @@ -201548,12 +202017,12 @@ func _fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) (r int32) { break } if (*TFts5Config)(unsafe.Pointer(p)).FeContent == int32(FTS5_CONTENT_EXTERNAL) { - _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+35953, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+36060, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { if (*TFts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_NORMAL || *(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr(i))) != 0 { - _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+35960, libc.VaList(bp+32, i)) + _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+36067, libc.VaList(bp+32, i)) } else { - _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+35968, 0) + _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+36075, 0) } } goto _1 @@ -201569,9 +202038,9 @@ func _fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) (r int32) { break } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr(i)))) == 0 { - _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+35975, libc.VaList(bp+32, i)) + _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+36082, libc.VaList(bp+32, i)) } else { - _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+35968, 0) + _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+8, __ccgo_ts+36075, 0) } goto _2 _2: @@ -201634,8 +202103,8 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in (*TFts5Config)(unsafe.Pointer(pRet)).FzName = _sqlite3Fts5Strndup(tls, bp, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -int32(1)) (*TFts5Config)(unsafe.Pointer(pRet)).FbColumnsize = int32(1) (*TFts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, __ccgo_ts+35872) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35983, libc.VaList(bp+40, (*TFts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, __ccgo_ts+35979) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36090, libc.VaList(bp+40, (*TFts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } i = int32(3) @@ -201666,7 +202135,7 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36012, libc.VaList(bp+40, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36119, libc.VaList(bp+40, zOrig)) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { if bOption != 0 { @@ -201696,7 +202165,7 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in } /* We only allow contentless_delete=1 if the table is indeed contentless. */ if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessDelete != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FeContent != int32(FTS5_CONTENT_NONE) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36032, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36139, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } /* We only allow contentless_delete=1 if columnsize=0 is not present. @@ -201704,37 +202173,37 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in ** This restriction may be removed at some point. */ if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessDelete != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FbColumnsize == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36082, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36189, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } /* We only allow contentless_unindexed=1 if the table is actually a ** contentless one. */ if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessUnindexed != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FeContent != int32(FTS5_CONTENT_NONE) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36137, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36244, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } /* If no zContent option was specified, fill in the default values. */ if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FzContent == uintptr(0) { zTail = uintptr(0) if (*TFts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = __ccgo_ts + 35495 + zTail = __ccgo_ts + 35602 } else { if *(*int32)(unsafe.Pointer(bp + 4)) != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessUnindexed != 0 { (*TFts5Config)(unsafe.Pointer(pRet)).FeContent = int32(FTS5_CONTENT_UNINDEXED) - zTail = __ccgo_ts + 35495 + zTail = __ccgo_ts + 35602 } else { if (*TFts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = __ccgo_ts + 36190 + zTail = __ccgo_ts + 36297 } } } if zTail != 0 { - (*TFts5Config)(unsafe.Pointer(pRet)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36198, libc.VaList(bp+40, (*TFts5Config)(unsafe.Pointer(pRet)).FzDb, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + (*TFts5Config)(unsafe.Pointer(pRet)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36305, libc.VaList(bp+40, (*TFts5Config)(unsafe.Pointer(pRet)).FzDb, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*TFts5Config)(unsafe.Pointer(pRet)).FzContentRowid = _sqlite3Fts5Strndup(tls, bp, __ccgo_ts+16848, -int32(1)) + (*TFts5Config)(unsafe.Pointer(pRet)).FzContentRowid = _sqlite3Fts5Strndup(tls, bp, __ccgo_ts+16920, -int32(1)) } /* Formulate the zContentExprlist text */ if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { @@ -201803,7 +202272,7 @@ func _sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) (r int32) { var _ /* rc at bp+0 */ int32 _, _, _, _ = i, zSep, zSql, v2 *(*int32)(unsafe.Pointer(bp)) = SQLITE_OK - zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36209, 0) + zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36316, 0) i = 0 for { if !(zSql != 0 && i < (*TFts5Config)(unsafe.Pointer(pConfig)).FnCol) { @@ -201812,16 +202281,16 @@ func _sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) (r int32) { if i == 0 { v2 = __ccgo_ts + 1665 } else { - v2 = __ccgo_ts + 15147 + v2 = __ccgo_ts + 15172 } zSep = v2 - zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36225, libc.VaList(bp+16, zSql, zSep, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36332, libc.VaList(bp+16, zSql, zSep, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) goto _1 _1: ; i++ } - zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36232, libc.VaList(bp+16, zSql, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, __ccgo_ts+35872)) + zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36339, libc.VaList(bp+16, zSql, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, __ccgo_ts+35979)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp)) = Xsqlite3_declare_vtab(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) Xsqlite3_free(tls, zSql) @@ -201979,7 +202448,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV var _ /* zRankArgs at bp+8 */ uintptr _, _, _, _, _, _, _, _, _, _, _, _ = bVal, bVal1, nAutomerge, nCrisisMerge, nHashSize, nUsermerge, nVal, pgsz, rc, zIn, v1, v2 rc = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36258) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36365) { pgsz = 0 if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -201990,7 +202459,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV (*TFts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36263) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36370) { nHashSize = -int32(1) if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -202001,7 +202470,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV (*TFts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36272) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36379) { nAutomerge = -int32(1) if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -202015,7 +202484,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV (*TFts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36282) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36389) { nUsermerge = -int32(1) if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -202026,7 +202495,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV (*TFts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36292) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36399) { nCrisisMerge = -int32(1) if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -202043,7 +202512,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV (*TFts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36304) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36411) { nVal = -int32(1) if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { nVal = Xsqlite3_value_int(tls, pVal) @@ -202058,7 +202527,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV } (*TFts5Config)(unsafe.Pointer(pConfig)).FnDeleteMerge = nVal } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+35872) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+35979) { zIn = Xsqlite3_value_text(tls, pVal) rc = _sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+8) if rc == SQLITE_OK { @@ -202073,7 +202542,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV } } } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36316) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36423) { bVal = -int32(1) if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { bVal = Xsqlite3_value_int(tls, pVal) @@ -202089,7 +202558,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV (*TFts5Config)(unsafe.Pointer(pConfig)).FbSecureDelete = v1 } } else { - if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36330) { + if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36437) { bVal1 = -int32(1) if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) { bVal1 = Xsqlite3_value_int(tls, pVal) @@ -202132,7 +202601,7 @@ func _sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) (r in var _ /* p at bp+0 */ uintptr var _ /* rc at bp+8 */ int32 _, _, _, _, _ = iVersion, pVal, zK, zSelect, zSql - zSelect = __ccgo_ts + 36340 + zSelect = __ccgo_ts + 36447 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 8)) = SQLITE_OK iVersion = 0 @@ -202152,7 +202621,7 @@ func _sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) (r in for int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { zK = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) pVal = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1)) - if 0 == Xsqlite3_stricmp(tls, zK, __ccgo_ts+36372) { + if 0 == Xsqlite3_stricmp(tls, zK, __ccgo_ts+36479) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 12)) = 0 @@ -202163,7 +202632,7 @@ func _sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) (r in } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK && iVersion != int32(FTS5_CURRENT_VERSION) && iVersion != int32(FTS5_CURRENT_VERSION_SECUREDELETE) { *(*int32)(unsafe.Pointer(bp + 8)) = int32(SQLITE_ERROR) - _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+36380, libc.VaList(bp+24, iVersion, int32(FTS5_CURRENT_VERSION), int32(FTS5_CURRENT_VERSION_SECUREDELETE))) + _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+36487, libc.VaList(bp+24, iVersion, int32(FTS5_CURRENT_VERSION), int32(FTS5_CURRENT_VERSION_SECUREDELETE))) } else { (*TFts5Config)(unsafe.Pointer(pConfig)).FiVersion = iVersion } @@ -202267,11 +202736,12 @@ type TFts5ExprNode1 = struct { FiRowid Ti64 FpNear uintptr FnChild int32 - FapChild [1]uintptr } type Fts5ExprNode1 = TFts5ExprNode1 +/* Size (in bytes) of an Fts5ExprNode object that holds up to N children */ + /* ** Invoke the xNext method of an Fts5ExprNode object. This macro should be ** used as if it has the same signature as the xNext() methods themselves. @@ -202301,24 +202771,26 @@ type TFts5ExprPhrase1 = struct { FpNode uintptr Fposlist TFts5Buffer FnTerm int32 - FaTerm [1]TFts5ExprTerm } type Fts5ExprPhrase1 = TFts5ExprPhrase1 +/* Size (in bytes) of an Fts5ExprPhrase object that holds up to N terms */ + /* ** One or more phrases that must appear within a certain token distance of ** each other within each matching document. */ type TFts5ExprNearset1 = struct { - FnNear int32 - FpColset uintptr - FnPhrase int32 - FapPhrase [1]uintptr + FnNear int32 + FpColset uintptr + FnPhrase int32 } type Fts5ExprNearset1 = TFts5ExprNearset1 +/* Size (in bytes) of an Fts5ExprNearset object covering up to N phrases */ + /* ** Parse context. */ @@ -202409,7 +202881,7 @@ func _fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr } } if int32(*(*int8)(unsafe.Pointer(z2))) == int32('\000') { - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36451, 0) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36558, 0) return FTS5_EOF } goto _1 @@ -202420,7 +202892,7 @@ func _fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr (*TFts5Token)(unsafe.Pointer(pToken)).Fn = int32(int64(z2) - int64(z)) default: if _sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36471, libc.VaList(bp+8, z)) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36578, libc.VaList(bp+8, z)) return FTS5_EOF } tok = int32(FTS5_STRING) @@ -202435,13 +202907,13 @@ func _fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr z21++ } (*TFts5Token)(unsafe.Pointer(pToken)).Fn = int32(int64(z21) - int64(z)) - if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(2) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36502, uint64(2)) == 0 { + if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(2) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36609, uint64(2)) == 0 { tok = int32(FTS5_OR) } - if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36505, uint64(3)) == 0 { + if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36612, uint64(3)) == 0 { tok = int32(FTS5_NOT) } - if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+30966, uint64(3)) == 0 { + if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+31021, uint64(3)) == 0 { tok = int32(FTS5_AND) } break @@ -202485,7 +202957,7 @@ func _sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCo /* If the LHS of the MATCH expression was a user column, apply the ** implicit column-filter. */ if (*(*TFts5Parse)(unsafe.Pointer(bp))).Frc == SQLITE_OK && iCol < (*TFts5Config)(unsafe.Pointer(pConfig)).FnCol { - n = int32(8) + n = libc.Int32FromUint64(libc.Uint64FromInt64(8) * libc.Uint64FromInt32((libc.Int32FromInt32(1)+libc.Int32FromInt32(2))/libc.Int32FromInt32(2))) pColset = _sqlite3Fts5MallocZero(tls, bp+16, int64(n)) if pColset != 0 { (*TFts5Colset)(unsafe.Pointer(pColset)).FnCol = int32(1) @@ -204124,7 +204596,7 @@ func _sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhr pRet = uintptr(0) if (*TFts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if pNear == uintptr(0) { - nByte = libc.Int64FromUint64(uint64(32) + libc.Uint64FromInt32(SZALLOC)*uint64(8)) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+24) + libc.Uint64FromInt32(SZALLOC+libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)) pRet = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(nByte)) if pRet == uintptr(0) { (*TFts5Parse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM) @@ -204134,7 +204606,7 @@ func _sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhr } else { if (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase%SZALLOC == 0 { nNew = (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase + SZALLOC - nByte1 = libc.Int64FromUint64(uint64(32) + libc.Uint64FromInt32(nNew)*uint64(8)) + nByte1 = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+24) + libc.Uint64FromInt32(nNew+libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)) pRet = Xsqlite3_realloc64(tls, pNear, libc.Uint64FromInt64(nByte1)) if pRet == uintptr(0) { (*TFts5Parse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM) @@ -204240,12 +204712,12 @@ func _fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken ui v2 = 0 } nNew = SZALLOC + v2 - pNew = Xsqlite3_realloc64(tls, pPhrase, uint64(uint64(72)+uint64(40)*libc.Uint64FromInt32(nNew))) + pNew = Xsqlite3_realloc64(tls, pPhrase, uint64(uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(nNew+libc.Int32FromInt32(1))*libc.Uint64FromInt64(40))) if pNew == uintptr(0) { *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM) } else { if pPhrase == uintptr(0) { - libc.Xmemset(tls, pNew, 0, uint64(72)) + libc.Xmemset(tls, pNew, 0, uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(40)) } v3 = pNew pPhrase = v3 @@ -204379,7 +204851,7 @@ func _sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToke if (*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase == uintptr(0) { /* This happens when parsing a token or quoted phrase that contains ** no token characters at all. (e.g ... MATCH '""'). */ - (*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase = _sqlite3Fts5MallocZero(tls, pParse+16, int64(72)) + (*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase = _sqlite3Fts5MallocZero(tls, pParse+16, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(40))) } else { if (*TFts5ExprPhrase)(unsafe.Pointer((*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase)).FnTerm != 0 { (*(*TFts5ExprTerm)(unsafe.Pointer((*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase + 32 + uintptr((*TFts5ExprPhrase)(unsafe.Pointer((*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase)).FnTerm-int32(1))*40))).FbPrefix = libc.Uint8FromInt32(bPrefix) @@ -204419,15 +204891,15 @@ func _sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, pp (*TFts5Expr)(unsafe.Pointer(pNew)).FapExprPhrase = _sqlite3Fts5MallocZero(tls, bp, int64(8)) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - (*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot = _sqlite3Fts5MallocZero(tls, bp, int64(56)) + (*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+48)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(8))) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - (*TFts5ExprNode)(unsafe.Pointer((*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint64(libc.Uint64FromInt64(32)+libc.Uint64FromInt64(8))) + (*TFts5ExprNode)(unsafe.Pointer((*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+24)+libc.Uint64FromInt32(libc.Int32FromInt32(2))*libc.Uint64FromInt64(8))) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && pOrig != uintptr(0) { pColsetOrig = (*TFts5ExprNearset)(unsafe.Pointer((*TFts5ExprNode)(unsafe.Pointer((*TFts5ExprPhrase)(unsafe.Pointer(pOrig)).FpNode)).FpNear)).FpColset if pColsetOrig != 0 { - nByte = libc.Int64FromUint64(uint64(8) + libc.Uint64FromInt32((*TFts5Colset)(unsafe.Pointer(pColsetOrig)).FnCol-libc.Int32FromInt32(1))*uint64(4)) + nByte = libc.Int64FromUint64(libc.Uint64FromInt64(8) * libc.Uint64FromInt32(((*TFts5Colset)(unsafe.Pointer(pColsetOrig)).FnCol+libc.Int32FromInt32(2))/libc.Int32FromInt32(2))) pColset = _sqlite3Fts5MallocZero(tls, bp, nByte) if pColset != 0 { libc.Xmemcpy(tls, pColset, pColsetOrig, libc.Uint64FromInt64(nByte)) @@ -204468,7 +204940,7 @@ func _sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, pp } else { /* This happens when parsing a token or quoted phrase that contains ** no token characters at all. (e.g ... MATCH '""'). */ - (*(*TTokenCtx)(unsafe.Pointer(bp + 8))).FpPhrase = _sqlite3Fts5MallocZero(tls, bp, int64(72)) + (*(*TTokenCtx)(unsafe.Pointer(bp + 8))).FpPhrase = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(40))) } } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*(*TTokenCtx)(unsafe.Pointer(bp + 8))).FpPhrase != 0 { @@ -204506,8 +204978,8 @@ func _sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, pp func _sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { bp := tls.Alloc(32) defer tls.Free(32) - if (*TFts5Token)(unsafe.Pointer(pTok)).Fn != int32(4) || libc.Xmemcmp(tls, __ccgo_ts+36509, (*TFts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35022, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(pTok)).Fn, (*TFts5Token)(unsafe.Pointer(pTok)).Fp)) + if (*TFts5Token)(unsafe.Pointer(pTok)).Fn != int32(4) || libc.Xmemcmp(tls, __ccgo_ts+36616, (*TFts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0 { + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35129, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(pTok)).Fn, (*TFts5Token)(unsafe.Pointer(pTok)).Fp)) } } @@ -204527,10 +204999,13 @@ func _sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, } c = *(*int8)(unsafe.Pointer((*TFts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < int32('0') || int32(c) > int32('9') { - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36514, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(p)).Fn, (*TFts5Token)(unsafe.Pointer(p)).Fp)) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36621, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(p)).Fn, (*TFts5Token)(unsafe.Pointer(p)).Fp)) return } - nNear = nNear*int32(10) + (int32(*(*int8)(unsafe.Pointer((*TFts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - int32('0')) + if nNear < int32(214748363) { + nNear = nNear*int32(10) + (int32(*(*int8)(unsafe.Pointer((*TFts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - int32('0')) + } + /* ^^^^^^^^^^^^^^^--- Prevent integer overflow */ goto _1 _1: ; @@ -204564,7 +205039,7 @@ func _fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) (r u v1 = 0 } nCol = v1 /* New colset object to return */ - pNew = Xsqlite3_realloc64(tls, p, uint64(uint64(8)+uint64(4)*libc.Uint64FromInt32(nCol))) + pNew = Xsqlite3_realloc64(tls, p, uint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32((nCol+libc.Int32FromInt32(1)+libc.Int32FromInt32(2))/libc.Int32FromInt32(2)))) if pNew == uintptr(0) { (*TFts5Parse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM) } else { @@ -204614,7 +205089,7 @@ func _sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) (r var pRet, v3 uintptr _, _, _, _, _, _ = i, iOld, nCol, pRet, v2, v3 nCol = (*TFts5Config)(unsafe.Pointer((*TFts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol - pRet = _sqlite3Fts5MallocZero(tls, pParse+16, libc.Int64FromUint64(uint64(8)+uint64(4)*libc.Uint64FromInt32(nCol))) + pRet = _sqlite3Fts5MallocZero(tls, pParse+16, libc.Int64FromUint64(libc.Uint64FromInt64(8)*libc.Uint64FromInt32((nCol+libc.Int32FromInt32(1)+libc.Int32FromInt32(2))/libc.Int32FromInt32(2)))) if pRet != 0 { iOld = 0 i = 0 @@ -204665,7 +205140,7 @@ func _sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p u iCol++ } if iCol == (*TFts5Config)(unsafe.Pointer(pConfig)).FnCol { - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+21235, libc.VaList(bp+8, z)) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+21307, libc.VaList(bp+8, z)) } else { pRet = _fts5ParseColset(tls, pParse, pColset, iCol) } @@ -204692,7 +205167,7 @@ func _fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) (r uintptr) { var pRet uintptr _, _ = nByte, pRet if pOrig != 0 { - nByte = libc.Int64FromUint64(uint64(8) + libc.Uint64FromInt32((*TFts5Colset)(unsafe.Pointer(pOrig)).FnCol-libc.Int32FromInt32(1))*uint64(4)) + nByte = libc.Int64FromUint64(libc.Uint64FromInt64(8) * libc.Uint64FromInt32(((*TFts5Colset)(unsafe.Pointer(pOrig)).FnCol+libc.Int32FromInt32(2))/libc.Int32FromInt32(2))) pRet = _sqlite3Fts5MallocZero(tls, pRc, nByte) if pRet != 0 { libc.Xmemcpy(tls, pRet, pOrig, libc.Uint64FromInt64(nByte)) @@ -204789,7 +205264,7 @@ func _sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pC var _ /* pFree at bp+0 */ uintptr *(*uintptr)(unsafe.Pointer(bp)) = pColset if (*TFts5Config)(unsafe.Pointer((*TFts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == int32(FTS5_DETAIL_NONE) { - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36543, 0) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36650, 0) } else { _fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } @@ -204874,7 +205349,7 @@ func _fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) (r uint var p, pPhrase, pRet, pTo, v3 uintptr _, _, _, _, _, _, _, _, _ = ii, nByte, nTerm, p, pPhrase, pRet, pTo, v2, v3 nTerm = (*TFts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 24)))).FnTerm - nByte = libc.Int32FromUint64(uint64(56) + libc.Uint64FromInt32(nTerm)*uint64(8)) + nByte = libc.Int32FromUint64(uint64(libc.UintptrFromInt32(0)+48) + libc.Uint64FromInt32(nTerm+libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)) pRet = _sqlite3Fts5MallocZero(tls, pParse+16, int64(nByte)) if pRet != 0 { (*TFts5ExprNode)(unsafe.Pointer(pRet)).FeType = int32(FTS5_AND) @@ -204887,7 +205362,7 @@ func _fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) (r uint if !(ii < nTerm) { break } - pPhrase = _sqlite3Fts5MallocZero(tls, pParse+16, int64(72)) + pPhrase = _sqlite3Fts5MallocZero(tls, pParse+16, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(40))) if pPhrase != 0 { if _parseGrowPhraseArray(tls, pParse) != 0 { _fts5ExprPhraseFree(tls, pPhrase) @@ -204961,7 +205436,7 @@ func _sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uin } } } - nByte = libc.Int64FromUint64(uint64(56) + uint64(8)*libc.Uint64FromInt32(nChild-libc.Int32FromInt32(1))) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+48) + libc.Uint64FromInt32(nChild)*libc.Uint64FromInt64(8)) pRet = _sqlite3Fts5MallocZero(tls, pParse+16, nByte) if pRet != 0 { (*TFts5ExprNode)(unsafe.Pointer(pRet)).FeType = eType @@ -204987,11 +205462,11 @@ func _sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uin pPhrase = *(*uintptr)(unsafe.Pointer(pNear + 24)) if (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase != int32(1) || (*TFts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > int32(1) || (*TFts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*(*TFts5ExprTerm)(unsafe.Pointer(pPhrase + 32))).FbFirst != 0 { if (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == int32(1) { - v2 = __ccgo_ts + 36596 + v2 = __ccgo_ts + 36703 } else { - v2 = __ccgo_ts + 36509 + v2 = __ccgo_ts + 36616 } - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36603, libc.VaList(bp+8, v2)) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36710, libc.VaList(bp+8, v2)) _sqlite3Fts5ParseNodeFree(tls, pRet) pRet = uintptr(0) pNear = uintptr(0) @@ -205004,7 +205479,7 @@ func _sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uin pRight = v3 pLeft = v3 if (*TFts5ExprNode)(unsafe.Pointer(pRet)).FiHeight > int32(SQLITE_FTS5_MAX_EXPR_DEPTH) { - _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36653, libc.VaList(bp+8, int32(SQLITE_FTS5_MAX_EXPR_DEPTH))) + _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36760, libc.VaList(bp+8, int32(SQLITE_FTS5_MAX_EXPR_DEPTH))) _sqlite3Fts5ParseNodeFree(tls, pRet) pRet = uintptr(0) } @@ -205481,7 +205956,7 @@ func _sqlite3Fts5ExprInstToken(tls *libc.TLS, pExpr uintptr, iRowid Ti64, iPhras // C documentation // // /* -// ** Clear the token mappings for all Fts5IndexIter objects mannaged by +// ** Clear the token mappings for all Fts5IndexIter objects managed by // ** the expression passed as the only argument. // */ func _sqlite3Fts5ExprClearTokens(tls *libc.TLS, pExpr uintptr) { @@ -205545,7 +206020,7 @@ type Fts5HashEntry = TFts5HashEntry /* ** This file contains the implementation of an in-memory hash table used -** to accumuluate "term -> doclist" content before it is flused to a level-0 +** to accumulate "term -> doclist" content before it is flushed to a level-0 ** segment. */ @@ -205604,7 +206079,7 @@ type TFts5HashEntry1 = struct { type Fts5HashEntry1 = TFts5HashEntry1 /* -** Eqivalent to: +** Equivalent to: ** ** char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } */ @@ -206486,9 +206961,9 @@ type TFts5Data = struct { type Fts5Data = TFts5Data type TFts5DlidxIter = struct { - FnLvl int32 - FiSegid int32 - FaLvl [1]TFts5DlidxLvl + F__ccgo_align [0]uint64 + FnLvl int32 + FiSegid int32 } type Fts5DlidxIter = TFts5DlidxIter @@ -206525,7 +207000,6 @@ type TFts5Iter = struct { FbSkipEmpty Tu8 FiSwitchRowid Ti64 FaFirst uintptr - FaSeg [1]TFts5SegIter } type Fts5Iter = TFts5Iter @@ -206598,7 +207072,6 @@ type TFts5Structure = struct { FnOriginCntr Tu64 FnSegment int32 FnLevel int32 - FaLevel [1]TFts5StructureLevel } type Fts5Structure = TFts5Structure @@ -206633,7 +207106,6 @@ type TFts5TokenDataIter = struct { FnIterAlloc int32 FaPoslistReader uintptr FaPoslistToIter uintptr - FapIter [1]uintptr } type Fts5TokenDataIter = TFts5TokenDataIter @@ -206648,9 +207120,9 @@ type TFts5TokenDataMap = struct { type Fts5TokenDataMap = TFts5TokenDataMap type TFts5TombstoneArray = struct { - FnRef int32 - FnTombstone int32 - FapTombstone [1]uintptr + F__ccgo_align [0]uint64 + FnRef int32 + FnTombstone int32 } type Fts5TombstoneArray = TFts5TombstoneArray @@ -206747,11 +207219,12 @@ type TFts5Structure1 = struct { FnOriginCntr Tu64 FnSegment int32 FnLevel int32 - FaLevel [1]TFts5StructureLevel } type Fts5Structure1 = TFts5Structure1 +/* Size (in bytes) of an Fts5Structure object holding up to N levels */ + /* ** An object of type Fts5SegWriter is used to write to segments. */ @@ -206884,13 +207357,15 @@ type Fts5SegIter1 = TFts5SegIter1 ** Array of tombstone pages. Reference counted. */ type TFts5TombstoneArray1 = struct { - FnRef int32 - FnTombstone int32 - FapTombstone [1]uintptr + F__ccgo_align [0]uint64 + FnRef int32 + FnTombstone int32 } type Fts5TombstoneArray1 = TFts5TombstoneArray1 +/* Size (in bytes) of an Fts5TombstoneArray holding up to N tombstones */ + /* ** Argument is a pointer to an Fts5Data structure that contains a ** leaf page. @@ -206943,11 +207418,12 @@ type TFts5Iter1 = struct { FbSkipEmpty Tu8 FiSwitchRowid Ti64 FaFirst uintptr - FaSeg [1]TFts5SegIter } type Fts5Iter1 = TFts5Iter1 +/* Size (in bytes) of an Fts5Iter object holding up to N segment iterators */ + /* ** An instance of the following type is used to iterate through the contents ** of a doclist-index record. @@ -206973,13 +207449,15 @@ type TFts5DlidxLvl1 = struct { type Fts5DlidxLvl1 = TFts5DlidxLvl1 type TFts5DlidxIter1 = struct { - FnLvl int32 - FiSegid int32 - FaLvl [1]TFts5DlidxLvl + F__ccgo_align [0]uint64 + FnLvl int32 + FiSegid int32 } type Fts5DlidxIter1 = TFts5DlidxIter1 +/* Size (in bytes) of an Fts5DlidxIter object with up to N levels */ + func _fts5PutU16(tls *libc.TLS, aOut uintptr, iVal Tu16) { *(*Tu8)(unsafe.Pointer(aOut)) = libc.Uint8FromInt32(libc.Int32FromUint16(iVal) >> libc.Int32FromInt32(8)) *(*Tu8)(unsafe.Pointer(aOut + 1)) = libc.Uint8FromInt32(libc.Int32FromUint16(iVal) & libc.Int32FromInt32(0xFF)) @@ -207158,7 +207636,7 @@ func _fts5DataRead(tls *libc.TLS, p uintptr, iRowid Ti64) (r uintptr) { ** to the requested entry. */ if (*TFts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig - rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36706, iRowid, 0, p+72) + rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36813, iRowid, 0, p+72) } /* If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls ** above returned SQLITE_ERROR, return SQLITE_CORRUPT_VTAB instead. @@ -207263,7 +207741,7 @@ func _fts5DataWrite(tls *libc.TLS, p uintptr, iRowid Ti64, pData uintptr, nData } if (*TFts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig - _fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, __ccgo_ts+36712, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) + _fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, __ccgo_ts+36819, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*TFts5Index)(unsafe.Pointer(p)).Frc != 0 { return } @@ -207292,7 +207770,7 @@ func _fts5DataDelete(tls *libc.TLS, p uintptr, iFirst Ti64, iLast Ti64) { } if (*TFts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+36763, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+36870, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) if _fts5IndexPrepareStmt(tls, p, p+88, zSql) != 0 { return } @@ -207326,7 +207804,7 @@ func _fts5DataRemoveSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { } if (*TFts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig - _fts5IndexPrepareStmt(tls, p, p+104, Xsqlite3_mprintf(tls, __ccgo_ts+36812, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) + _fts5IndexPrepareStmt(tls, p, p+104, Xsqlite3_mprintf(tls, __ccgo_ts+36919, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, (*TFts5Index)(unsafe.Pointer(p)).FpIdxDeleter, int32(1), iSegid) @@ -207404,7 +207882,7 @@ func _fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { _, _, _, _, _ = i, nByte, p, pLvl, pNew p = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*TFts5Structure)(unsafe.Pointer(p)).FnRef > int32(1) { - nByte = libc.Int64FromUint64(uint64(48) + libc.Uint64FromInt32((*TFts5Structure)(unsafe.Pointer(p)).FnLevel-libc.Int32FromInt32(1))*uint64(16)) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+32) + libc.Uint64FromInt32((*TFts5Structure)(unsafe.Pointer(p)).FnLevel)*libc.Uint64FromInt64(16)) pNew = _sqlite3Fts5MallocZero(tls, pRc, nByte) if pNew != 0 { libc.Xmemcpy(tls, pNew, p, libc.Uint64FromInt64(nByte)) @@ -207495,7 +207973,7 @@ func _fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie ui } i = int32(4) /* Check if this is a V2 structure record. Set bStructureV2 if it is. */ - if 0 == libc.Xmemcmp(tls, pData+uintptr(i), __ccgo_ts+36852, uint64(4)) { + if 0 == libc.Xmemcmp(tls, pData+uintptr(i), __ccgo_ts+36959, uint64(4)) { i += int32(4) bStructureV2 = int32(1) } @@ -207506,7 +207984,7 @@ func _fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie ui if *(*int32)(unsafe.Pointer(bp + 4)) > int32(FTS5_MAX_SEGMENT) || *(*int32)(unsafe.Pointer(bp + 4)) < 0 || *(*int32)(unsafe.Pointer(bp + 8)) > int32(FTS5_MAX_SEGMENT) || *(*int32)(unsafe.Pointer(bp + 8)) < 0 { return libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8) } - nByte = libc.Int64FromUint64(libc.Uint64FromInt64(48) + libc.Uint64FromInt64(16)*libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 4))-libc.Int32FromInt32(1))) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+32) + libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 4)))*libc.Uint64FromInt64(16)) pRet = _sqlite3Fts5MallocZero(tls, bp, nByte) if pRet != 0 { (*TFts5Structure)(unsafe.Pointer(pRet)).FnRef = int32(1) @@ -207610,7 +208088,7 @@ func _fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pStruct = *(*uintptr)(unsafe.Pointer(ppStruct)) nLevel = (*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel - nByte = libc.Int64FromUint64(libc.Uint64FromInt64(48) + libc.Uint64FromInt64(16)*libc.Uint64FromInt32(nLevel+libc.Int32FromInt32(1))) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+32) + libc.Uint64FromInt32(nLevel+libc.Int32FromInt32(2))*libc.Uint64FromInt64(16)) pStruct = Xsqlite3_realloc64(tls, pStruct, libc.Uint64FromInt64(nByte)) if pStruct != 0 { libc.Xmemset(tls, pStruct+32+uintptr(nLevel)*16, 0, uint64(16)) @@ -207686,7 +208164,7 @@ func _fts5IndexDataVersion(tls *libc.TLS, p uintptr) (r Ti64) { iVersion = 0 if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*TFts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { - (*TFts5Index)(unsafe.Pointer(p)).Frc = _fts5IndexPrepareStmt(tls, p, p+144, Xsqlite3_mprintf(tls, __ccgo_ts+36857, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + (*TFts5Index)(unsafe.Pointer(p)).Frc = _fts5IndexPrepareStmt(tls, p, p+144, Xsqlite3_mprintf(tls, __ccgo_ts+36964, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*TFts5Index)(unsafe.Pointer(p)).Frc != 0 { return 0 } @@ -207770,7 +208248,7 @@ func _fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { _sqlite3Fts5Put32(tls, (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fp, iCookie) (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fn = int32(4) if (*TFts5Structure)(unsafe.Pointer(pStruct)).FnOriginCntr > uint64(0) { - libc.Xmemcpy(tls, (*TFts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*TFts5Buffer)(unsafe.Pointer(bp)).Fn), __ccgo_ts+36852, uint64(4)) + libc.Xmemcpy(tls, (*TFts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*TFts5Buffer)(unsafe.Pointer(bp)).Fn), __ccgo_ts+36959, uint64(4)) *(*int32)(unsafe.Pointer(bp + 8)) += int32(4) } *(*int32)(unsafe.Pointer(bp + 8)) += _sqlite3Fts5PutVarint(tls, (*TFts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*TFts5Buffer)(unsafe.Pointer(bp)).Fn), libc.Uint64FromInt32((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel)) @@ -208187,7 +208665,7 @@ func _fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLea if !((*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && bDone == 0) { break } - nByte = libc.Int64FromUint64(uint64(40) + libc.Uint64FromInt32(i)*uint64(32)) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+8) + libc.Uint64FromInt32(i+libc.Int32FromInt32(1))*libc.Uint64FromInt64(32)) pNew = Xsqlite3_realloc64(tls, pIter, libc.Uint64FromInt64(nByte)) if pNew == uintptr(0) { (*TFts5Index)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM) @@ -208437,7 +208915,7 @@ func _fts5SegIterAllocTombstone(tls *libc.TLS, p uintptr, pIter uintptr) { _, _, _ = nByte, nTomb, pNew nTomb = (*TFts5StructureSegment)(unsafe.Pointer((*TFts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FnPgTombstone if nTomb > 0 { - nByte = libc.Int32FromUint64(libc.Uint64FromInt32(nTomb)*uint64(8) + uint64(16)) + nByte = libc.Int32FromUint64(uint64(libc.UintptrFromInt32(0)+8) + libc.Uint64FromInt32(nTomb+libc.Int32FromInt32(1))*libc.Uint64FromInt64(8)) pNew = _sqlite3Fts5MallocZero(tls, p+60, int64(nByte)) if pNew != 0 { (*TFts5TombstoneArray)(unsafe.Pointer(pNew)).FnTombstone = nTomb @@ -209147,7 +209625,7 @@ func _fts5IdxSelectStmt(tls *libc.TLS, p uintptr) (r uintptr) { _ = pConfig if (*TFts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig - _fts5IndexPrepareStmt(tls, p, p+112, Xsqlite3_mprintf(tls, __ccgo_ts+36880, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) + _fts5IndexPrepareStmt(tls, p, p+112, Xsqlite3_mprintf(tls, __ccgo_ts+36987, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*TFts5Index)(unsafe.Pointer(p)).FpIdxSelect } @@ -209236,7 +209714,7 @@ func _fts5IdxNextStmt(tls *libc.TLS, p uintptr) (r uintptr) { _ = pConfig if (*TFts5Index)(unsafe.Pointer(p)).FpIdxNextSelect == uintptr(0) { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig - _fts5IndexPrepareStmt(tls, p, p+120, Xsqlite3_mprintf(tls, __ccgo_ts+36964, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) + _fts5IndexPrepareStmt(tls, p, p+120, Xsqlite3_mprintf(tls, __ccgo_ts+37071, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*TFts5Index)(unsafe.Pointer(p)).FpIdxNextSelect } @@ -209883,7 +210361,7 @@ func _fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) (r uintptr) { ; nSlot = nSlot * int64(2) } - pNew = _fts5IdxMalloc(tls, p, libc.Int64FromUint64(uint64(232)+uint64(128)*libc.Uint64FromInt64(nSlot-libc.Int64FromInt32(1))+uint64(4)*libc.Uint64FromInt64(nSlot))) + pNew = _fts5IdxMalloc(tls, p, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+104)+libc.Uint64FromInt64(nSlot)*uint64(128)+uint64(4)*libc.Uint64FromInt64(nSlot))) if pNew != 0 { (*TFts5Iter)(unsafe.Pointer(pNew)).FnSeg = int32(nSlot) (*TFts5Iter)(unsafe.Pointer(pNew)).FaFirst = pNew + 104 + uintptr(nSlot)*128 @@ -211207,7 +211685,7 @@ func _fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { _sqlite3Fts5BufferSize(tls, p+60, pWriter+8+8, libc.Uint32FromInt32(nBuffer)) if (*TFts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig - _fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, __ccgo_ts+37046, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) + _fts5IndexPrepareStmt(tls, p, p+96, Xsqlite3_mprintf(tls, __ccgo_ts+37153, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { /* Initialize the 4-byte leaf-page header to 0x00. */ @@ -211713,7 +212191,7 @@ func _fts5SecureDeleteIdxEntry(tls *libc.TLS, p uintptr, iSegid int32, iPgno int defer tls.Free(32) if iPgno != int32(1) { if (*TFts5Index)(unsafe.Pointer(p)).FpDeleteFromIdx == uintptr(0) { - _fts5IndexPrepareStmt(tls, p, p+136, Xsqlite3_mprintf(tls, __ccgo_ts+37103, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzName))) + _fts5IndexPrepareStmt(tls, p, p+136, Xsqlite3_mprintf(tls, __ccgo_ts+37210, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzName))) } if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, (*TFts5Index)(unsafe.Pointer(p)).FpDeleteFromIdx, int32(1), iSegid) @@ -211882,7 +212360,7 @@ func _fts5DoSecureDelete(tls *libc.TLS, p uintptr, pSeg uintptr) { iStart = 0 iDelKeyOff = 0 /* Offset of deleted key, if any */ nIdx = nPg - iPgIdx - aIdx = _sqlite3Fts5MallocZero(tls, p+60, int64(nIdx+int32(16))) + aIdx = _sqlite3Fts5MallocZero(tls, p+60, int64(nIdx)+int64(16)) if (*TFts5Index)(unsafe.Pointer(p)).Frc != 0 { return } @@ -212200,7 +212678,7 @@ func _fts5FlushSecureDelete(tls *libc.TLS, p uintptr, pStruct uintptr, zTerm uin if (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FiVersion != int32(FTS5_CURRENT_VERSION_SECUREDELETE) { pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) - _fts5IndexPrepareStmt(tls, p, bp+8, Xsqlite3_mprintf(tls, __ccgo_ts+37164, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, int32(FTS5_CURRENT_VERSION_SECUREDELETE)))) + _fts5IndexPrepareStmt(tls, p, bp+8, Xsqlite3_mprintf(tls, __ccgo_ts+37271, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, int32(FTS5_CURRENT_VERSION_SECUREDELETE)))) if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -212475,7 +212953,7 @@ func _fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) (r uint var pLvl, pNew uintptr _, _, _, _, _, _, _, _, _, _, _, _ = i, iLvl, iSeg, iSegOut, nByte, nMerge, nSeg, nThis, pLvl, pNew, v2, v5 pNew = uintptr(0) - nByte = int64(48) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+32) + libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(16)) nSeg = (*TFts5Structure)(unsafe.Pointer(pStruct)).FnSegment /* Figure out if this structure requires optimization. A structure does ** not require optimization if either: @@ -212510,7 +212988,7 @@ func _fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) (r uint ; i++ } - nByte = Tsqlite3_int64(uint64(nByte) + uint64(libc.Uint64FromInt32((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel+libc.Int32FromInt32(1))*libc.Uint64FromInt64(16))) + nByte = Tsqlite3_int64(uint64(nByte) + libc.Uint64FromInt64(int64((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel)+libc.Int64FromInt32(1))*libc.Uint64FromInt64(16)) pNew = _sqlite3Fts5MallocZero(tls, p+60, nByte) if pNew != 0 { nByte = libc.Int64FromUint64(libc.Uint64FromInt32(nSeg) * uint64(56)) @@ -213124,11 +213602,12 @@ type TFts5TokenDataIter1 = struct { FnIterAlloc int32 FaPoslistReader uintptr FaPoslistToIter uintptr - FapIter [1]uintptr } type Fts5TokenDataIter1 = TFts5TokenDataIter1 +/* Size in bytes of an Fts5TokenDataIter object holding up to N iterators */ + // C documentation // // /* @@ -213196,7 +213675,7 @@ func _fts5TokendataIterAppendMap(tls *libc.TLS, p uintptr, pT uintptr, iIter int // /* // ** Sort the contents of the pT->aMap[] array. // ** -// ** The sorting algorithm requries a malloc(). If this fails, an error code +// ** The sorting algorithm requires a malloc(). If this fails, an error code // ** is left in Fts5Index.rc before returning. // */ func _fts5TokendataIterSortMap(tls *libc.TLS, p uintptr, pT uintptr) { @@ -213440,7 +213919,7 @@ func _fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTo (*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FnBuf = int32(32) if iIdx == 0 && (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == FTS5_DETAIL_FULL && (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FbPrefixInsttoken != 0 { (*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FpTokendata = bp + 72 - (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 72))).FpT = _fts5IdxMalloc(tls, p, int64(64)) + (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 72))).FpT = _fts5IdxMalloc(tls, p, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+56)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(104))) } if (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == int32(FTS5_DETAIL_NONE) { (*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FxMerge = __ccgo_fp(_fts5MergeRowidLists) @@ -213490,7 +213969,7 @@ func _fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTo ; i += (*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FnMerge } - pData = _fts5IdxMalloc(tls, p, libc.Int64FromUint64(uint64(16)+libc.Uint64FromInt32((*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).Fdoclist.Fn)+uint64(FTS5_DATA_ZERO_PADDING))) + pData = _fts5IdxMalloc(tls, p, libc.Int64FromUint64(uint64(16)+libc.Uint64FromInt64(int64((*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).Fdoclist.Fn))+uint64(FTS5_DATA_ZERO_PADDING))) if pData != 0 { (*TFts5Data)(unsafe.Pointer(pData)).Fp = pData + 1*16 v3 = (*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).Fdoclist.Fn @@ -213572,15 +214051,18 @@ func _sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) (r int32) { func _sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) (r int32) { bp := tls.Alloc(48) defer tls.Free(48) - var _ /* s at bp+0 */ TFts5Structure + var pTmp uintptr + var _ /* tmpSpace at bp+0 */ [48]Tu8 + _ = pTmp _fts5StructureInvalidate(tls, p) _fts5IndexDiscardData(tls, p) - libc.Xmemset(tls, bp, 0, uint64(48)) + pTmp = bp + libc.Xmemset(tls, pTmp, 0, uint64(libc.UintptrFromInt32(0)+32)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(16)) if (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FbContentlessDelete != 0 { - (*(*TFts5Structure)(unsafe.Pointer(bp))).FnOriginCntr = uint64(1) + (*TFts5Structure)(unsafe.Pointer(pTmp)).FnOriginCntr = uint64(1) } _fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), __ccgo_ts+1665, 0) - _fts5StructureWrite(tls, p, bp) + _fts5StructureWrite(tls, p, pTmp) return _fts5IndexReturn(tls, p) } @@ -213606,11 +214088,11 @@ func _sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uin if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { (*TFts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*TFts5Index)(unsafe.Pointer(p)).FnWorkUnit = int32(FTS5_WORK_UNIT) - (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37215, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37322, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+26001, __ccgo_ts+37223, 0, pzErr) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+26056, __ccgo_ts+37330, 0, pzErr) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+11982, __ccgo_ts+37258, int32(1), pzErr) + *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+12007, __ccgo_ts+37365, int32(1), pzErr) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5IndexReinit(tls, p) @@ -213808,7 +214290,7 @@ func _fts5AppendTokendataIter(tls *libc.TLS, p uintptr, pIn uintptr, pAppend uin v1 = int32(16) } nAlloc = v1 - nByte = libc.Int32FromUint64(libc.Uint64FromInt32(nAlloc)*uint64(8) + uint64(64)) + nByte = libc.Int32FromUint64(uint64(libc.UintptrFromInt32(0)+56) + libc.Uint64FromInt32(nAlloc+libc.Int32FromInt32(1))*libc.Uint64FromInt64(104)) pNew = Xsqlite3_realloc(tls, pIn, nByte) if pNew == uintptr(0) { (*TFts5Index)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM) @@ -214063,7 +214545,7 @@ func _fts5SetupTokendataIter(tls *libc.TLS, p uintptr, pToken uintptr, nToken in pNew = _fts5MultiIterAlloc(tls, p, (*TFts5Structure)(unsafe.Pointer(pStruct)).FnSegment) if pSmall != 0 { _sqlite3Fts5BufferSet(tls, p+60, bp, (*TFts5Buffer)(unsafe.Pointer(pSmall)).Fn, (*TFts5Buffer)(unsafe.Pointer(pSmall)).Fp) - _sqlite3Fts5BufferAppendBlob(tls, p+60, bp, uint32(1), __ccgo_ts+37302) + _sqlite3Fts5BufferAppendBlob(tls, p+60, bp, uint32(1), __ccgo_ts+37409) } else { _sqlite3Fts5BufferSet(tls, p+60, bp, nToken, pToken) } @@ -214414,7 +214896,7 @@ func _fts5SetupPrefixIterTokendata(tls *libc.TLS, pIter uintptr, pToken uintptr, if !(libc.Uint32FromInt32((*TFts5Buffer)(unsafe.Pointer(bp)).Fn)+libc.Uint32FromInt32(nToken+libc.Int32FromInt32(1)) <= libc.Uint32FromInt32((*TFts5Buffer)(unsafe.Pointer(bp)).FnSpace)) { _sqlite3Fts5BufferSize(tls, p+60, bp, libc.Uint32FromInt32(nToken+int32(1)+(*TFts5Buffer)(unsafe.Pointer(bp)).Fn)) } - (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 16))).FpT = _sqlite3Fts5MallocZero(tls, p+60, int64(64)) + (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 16))).FpT = _sqlite3Fts5MallocZero(tls, p+60, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+56)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(104))) if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { /* Fill in the token prefix to search for */ *(*Tu8)(unsafe.Pointer((*(*TFts5Buffer)(unsafe.Pointer(bp))).Fp)) = uint8('0') @@ -214536,7 +215018,7 @@ func _sqlite3Fts5IndexIterWriteTokendata(tls *libc.TLS, pIndexIter uintptr, pTok if (*TFts5Iter)(unsafe.Pointer(pIter)).FnSeg > 0 { /* This is a prefix term iterator. */ if pT == uintptr(0) { - pT = _sqlite3Fts5MallocZero(tls, p+60, int64(64)) + pT = _sqlite3Fts5MallocZero(tls, p+60, libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+56)+libc.Uint64FromInt32(libc.Int32FromInt32(1))*libc.Uint64FromInt64(104))) (*TFts5Iter)(unsafe.Pointer(pIter)).FpTokenDataIter = pT } if pT != 0 { @@ -214656,7 +215138,7 @@ func _sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) (r int32) pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig /* Binary representation of iNew */ *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) _sqlite3Fts5Put32(tls, bp, iNew) - rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36706, int64(FTS5_STRUCTURE_ROWID), int32(1), bp+8) + rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36813, int64(FTS5_STRUCTURE_ROWID), int32(1), bp+8) if rc == SQLITE_OK { Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), bp, int32(4), 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) @@ -215250,7 +215732,7 @@ func _fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { if (*TFts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { return } - _fts5IndexPrepareStmt(tls, p, bp, Xsqlite3_mprintf(tls, __ccgo_ts+37304, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) + _fts5IndexPrepareStmt(tls, p, bp, Xsqlite3_mprintf(tls, __ccgo_ts+37411, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) /* Iterate through the b-tree hierarchy. */ for (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { /* Data for this leaf */ zIdxTerm = Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1)) @@ -215481,7 +215963,7 @@ func _sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum Tu64, bUseC } else { (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fn = 0 _fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16))+104+uintptr((*(*TFts5CResult)(unsafe.Pointer((*TFts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaFirst + 1*4))).FiFirst)*128, uintptr(0), bp) - _sqlite3Fts5BufferAppendBlob(tls, p+60, bp, uint32(4), __ccgo_ts+37390) + _sqlite3Fts5BufferAppendBlob(tls, p+60, bp, uint32(4), __ccgo_ts+37497) for 0 == _sqlite3Fts5PoslistNext64(tls, (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fp, (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fn, bp+40, bp+32) { iCol = int32(*(*Ti64)(unsafe.Pointer(bp + 32)) >> libc.Int32FromInt32(32) & libc.Int64FromInt32(0x7FFFFFFF)) iTokOff = int32(*(*Ti64)(unsafe.Pointer(bp + 32)) & libc.Int64FromInt32(0x7FFFFFFF)) @@ -215620,7 +216102,6 @@ type TFts5Sorter = struct { FiRowid Ti64 FaPoslist uintptr FnIdx int32 - FaIdx [1]int32 } type Fts5Sorter = TFts5Sorter @@ -215777,11 +216258,12 @@ type TFts5Sorter1 = struct { FiRowid Ti64 FaPoslist uintptr FnIdx int32 - FaIdx [1]int32 } type Fts5Sorter1 = TFts5Sorter1 +/* Size (int bytes) of an Fts5Sorter object with N indexes */ + /* ** Virtual-table cursor object. ** @@ -216103,7 +216585,7 @@ func _fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) (r int32) nSeenMatch = 0 bSeenRank = 0 if (*TFts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { - (*TFts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37395, 0) + (*TFts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37502, 0) return int32(SQLITE_ERROR) } idxStr = Xsqlite3_malloc(tls, (*Tsqlite3_index_info)(unsafe.Pointer(pInfo)).FnConstraint*int32(8)+int32(1)) @@ -216140,7 +216622,7 @@ func _fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) (r int32) v3 = iIdxStr iIdxStr++ *(*int8)(unsafe.Pointer(idxStr + uintptr(v3))) = int8('M') - Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5205, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5231, libc.VaList(bp+8, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } iCons++ @@ -216159,7 +216641,7 @@ func _fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) (r int32) v6 = int32('G') } *(*int8)(unsafe.Pointer(idxStr + uintptr(v5))) = int8(v6) - Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5205, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5231, libc.VaList(bp+8, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) iCons++ v7 = iCons @@ -216609,7 +217091,7 @@ func _fts5NextMethod(tls *libc.TLS, pCursor uintptr) (r int32) { *(*int32)(unsafe.Pointer(pCsr + 80)) |= int32(FTS5CSR_EOF) rc = Xsqlite3_reset(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) if rc != SQLITE_OK { - (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb))) + (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -216637,7 +217119,7 @@ func _fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt } else { rc = Xsqlite3_prepare_v3(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -int32(1), uint32(SQLITE_PREPARE_PERSISTENT), bp, uintptr(0)) if rc != SQLITE_OK { - _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+3862, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb))) + _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+3888, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -216657,7 +217139,7 @@ func _fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int zRank = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank zRankArgs = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs nPhrase = _sqlite3Fts5ExprPhraseCount(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) - nByte = libc.Int64FromUint64(uint64(32) + uint64(4)*libc.Uint64FromInt32(nPhrase-libc.Int32FromInt32(1))) + nByte = libc.Int64FromUint64(uint64(libc.UintptrFromInt32(0)+24) + libc.Uint64FromInt32((nPhrase+libc.Int32FromInt32(2))/libc.Int32FromInt32(2))*libc.Uint64FromInt64(8)) pSorter = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(nByte)) if pSorter == uintptr(0) { return int32(SQLITE_NOMEM) @@ -216672,7 +217154,7 @@ func _fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int ** ** If SQLite a built-in statement cache, this wouldn't be a problem. */ if zRankArgs != 0 { - v1 = __ccgo_ts + 15147 + v1 = __ccgo_ts + 15172 } else { v1 = __ccgo_ts + 1665 } @@ -216682,11 +217164,11 @@ func _fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int v2 = __ccgo_ts + 1665 } if bDesc != 0 { - v3 = __ccgo_ts + 37434 + v3 = __ccgo_ts + 37541 } else { - v3 = __ccgo_ts + 37439 + v3 = __ccgo_ts + 37546 } - rc = _fts5PrepareStatement(tls, pSorter, pConfig, __ccgo_ts+37443, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, v1, v2, v3)) + rc = _fts5PrepareStatement(tls, pSorter, pConfig, __ccgo_ts+37550, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, v1, v2, v3)) (*TFts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter if rc == SQLITE_OK { (*TFts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr = pCsr @@ -216744,14 +217226,14 @@ func _fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr n++ } (*TFts5Cursor)(unsafe.Pointer(pCsr)).FePlan = int32(FTS5_PLAN_SPECIAL) - if n == int32(5) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+37498, z, n) { + if n == int32(5) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+37605, z, n) { (*TFts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = int64(_sqlite3Fts5IndexReads(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) } else { - if n == int32(2) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+5564, z, n) { + if n == int32(2) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+5590, z, n) { (*TFts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { /* An unrecognized directive. Return an error message. */ - (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37504, libc.VaList(bp+8, n, z)) + (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37611, libc.VaList(bp+8, n, z)) rc = int32(SQLITE_ERROR) } } @@ -216801,7 +217283,7 @@ func _fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) (r int32) { zRank = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank zRankArgs = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37532, libc.VaList(bp+24, zRankArgs)) + zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37639, libc.VaList(bp+24, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) *(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v3(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -int32(1), uint32(SQLITE_PREPARE_PERSISTENT), bp+8, uintptr(0)) @@ -216834,7 +217316,7 @@ func _fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) (r int32) { if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { pAux = _fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37542, libc.VaList(bp+24, zRank)) + (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37649, libc.VaList(bp+24, zRank)) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } } @@ -216868,7 +217350,7 @@ func _fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank ui *(*int32)(unsafe.Pointer(pCsr + 80)) |= int32(FTS5CSR_FREE_ZRANK) } else { if rc == int32(SQLITE_ERROR) { - (*Tsqlite3_vtab)(unsafe.Pointer((*TFts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37563, libc.VaList(bp+24, z)) + (*Tsqlite3_vtab)(unsafe.Pointer((*TFts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37670, libc.VaList(bp+24, z)) } } } else { @@ -216876,7 +217358,7 @@ func _fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank ui (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*TFts5Config)(unsafe.Pointer(pConfig)).FzRank (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*TFts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank = __ccgo_ts + 35290 + (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank = __ccgo_ts + 35397 (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } @@ -217033,7 +217515,7 @@ func _fts5ExtractExprText(tls *libc.TLS, pConfig uintptr, pVal uintptr, pzText u *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32)) = 0 *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5DecodeLocaleValue(tls, pVal, bp+8, bp+16, bp+24, bp+32) - *(*uintptr)(unsafe.Pointer(pzText)) = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37596, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(bp + 16)), *(*uintptr)(unsafe.Pointer(bp + 8)))) + *(*uintptr)(unsafe.Pointer(pzText)) = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37703, libc.VaList(bp+48, *(*int32)(unsafe.Pointer(bp + 16)), *(*uintptr)(unsafe.Pointer(bp + 8)))) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { _sqlite3Fts5SetLocale(tls, pConfig, *(*uintptr)(unsafe.Pointer(bp + 24)), *(*int32)(unsafe.Pointer(bp + 32))) } @@ -217233,7 +217715,7 @@ func _fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uint } } else { if (*TFts5Config)(unsafe.Pointer(pConfig)).FzContent == uintptr(0) { - _fts5SetVtabError(tls, pTab, __ccgo_ts+37601, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + _fts5SetVtabError(tls, pTab, __ccgo_ts+37708, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = int32(SQLITE_ERROR) } else { /* This is either a full-table scan (ePlan==FTS5_PLAN_SCAN) or a lookup @@ -217366,10 +217848,10 @@ func _fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) (r int32) { rc = Xsqlite3_reset(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) if rc == SQLITE_OK { rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8) - _fts5SetVtabError(tls, pTab1, __ccgo_ts+37637, libc.VaList(bp+8, _fts5CursorRowid(tls, pCsr), (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).FzContent)) + _fts5SetVtabError(tls, pTab1, __ccgo_ts+37744, libc.VaList(bp+8, _fts5CursorRowid(tls, pCsr), (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).FzContent)) } else { if (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).FpzErrmsg != 0 { - _fts5SetVtabError(tls, pTab1, __ccgo_ts+3862, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).Fdb))) + _fts5SetVtabError(tls, pTab1, __ccgo_ts+3888, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).Fdb))) } } } @@ -217405,36 +217887,36 @@ func _fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp)) = 0 bLoadConfig = 0 - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37682, zCmd) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37789, zCmd) { if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - _fts5SetVtabError(tls, pTab, __ccgo_ts+37693, 0) + _fts5SetVtabError(tls, pTab, __ccgo_ts+37800, 0) rc = int32(SQLITE_ERROR) } else { rc = _sqlite3Fts5StorageDeleteAll(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } bLoadConfig = int32(1) } else { - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37773, zCmd) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37880, zCmd) { if _fts5IsContentless(tls, pTab, int32(1)) != 0 { - _fts5SetVtabError(tls, pTab, __ccgo_ts+37781, 0) + _fts5SetVtabError(tls, pTab, __ccgo_ts+37888, 0) rc = int32(SQLITE_ERROR) } else { rc = _sqlite3Fts5StorageRebuild(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } bLoadConfig = int32(1) } else { - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+17515, zCmd) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+17587, zCmd) { rc = _sqlite3Fts5StorageOptimize(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } else { - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37837, zCmd) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37944, zCmd) { nMerge = Xsqlite3_value_int(tls, pVal) rc = _sqlite3Fts5StorageMerge(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) } else { - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37843, zCmd) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37950, zCmd) { iArg = Xsqlite3_value_int(tls, pVal) rc = _sqlite3Fts5StorageIntegrity(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { - if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37859, zCmd) { + if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37966, zCmd) { rc = _sqlite3Fts5FlushToDisk(tls, pTab) } else { rc = _sqlite3Fts5FlushToDisk(tls, pTab) @@ -217547,11 +218029,11 @@ func _fts5ContentlessUpdate(tls *libc.TLS, pConfig uintptr, apVal uintptr, bRowi if bSeenIndexNC != 0 || (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete == 0 { rc = int32(SQLITE_ERROR) if (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete != 0 { - v2 = __ccgo_ts + 37865 + v2 = __ccgo_ts + 37972 } else { - v2 = __ccgo_ts + 37925 + v2 = __ccgo_ts + 38032 } - _sqlite3Fts5ConfigErrmsg(tls, pConfig, v2, libc.VaList(bp+8, __ccgo_ts+37955, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + _sqlite3Fts5ConfigErrmsg(tls, pConfig, v2, libc.VaList(bp+8, __ccgo_ts+38062, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) } } return rc @@ -217599,9 +218081,9 @@ func _fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, if eType0 == int32(SQLITE_NULL) && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(int32(2)+(*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) != int32(SQLITE_NULL) { /* A "special" INSERT op. These are handled separately. */ z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(int32(2)+(*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*8))) - if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+18035, z) { + if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+18107, z) { if (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete != 0 { - _fts5SetVtabError(tls, pTab, __ccgo_ts+37969, 0) + _fts5SetVtabError(tls, pTab, __ccgo_ts+38076, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { *(*int32)(unsafe.Pointer(bp)) = _fts5SpecialDelete(tls, pTab, apVal) @@ -217630,7 +218112,7 @@ func _fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, /* It is only possible to DELETE from a contentless table if the ** contentless_delete=1 flag is set. */ if _fts5IsContentless(tls, pTab, int32(1)) != 0 && (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete == 0 { - _fts5SetVtabError(tls, pTab, __ccgo_ts+38028, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + _fts5SetVtabError(tls, pTab, __ccgo_ts+38135, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { iDel = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal))) /* Rowid to delete */ @@ -217648,7 +218130,7 @@ func _fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, } pVal = *(*uintptr)(unsafe.Pointer(apVal + uintptr(ii+int32(2))*8)) if _sqlite3Fts5IsLocaleValue(tls, pConfig, pVal) != 0 { - _fts5SetVtabError(tls, pTab, __ccgo_ts+38074, 0) + _fts5SetVtabError(tls, pTab, __ccgo_ts+38181, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_MISMATCH) goto update_out } @@ -218674,7 +219156,7 @@ func _fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) iCsrId = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) pCsr = _fts5CursorFromCsrid(tls, (*TFts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || ((*TFts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 || (*TFts5Cursor)(unsafe.Pointer(pCsr)).FePlan == int32(FTS5_PLAN_SPECIAL)) { - _fts5ResultError(tls, context, __ccgo_ts+38106, libc.VaList(bp+8, iCsrId)) + _fts5ResultError(tls, context, __ccgo_ts+38213, libc.VaList(bp+8, iCsrId)) } else { pTab = (*TFts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab _fts5ApiInvoke(tls, pAux, pCsr, context, argc-int32(1), argv+1*8) @@ -219333,7 +219815,7 @@ func _sqlite3Fts5LoadTokenizer(tls *libc.TLS, pConfig uintptr) (r int32) { pMod = _fts5LocateTokenizer(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).FpGlobal, v1) if pMod == uintptr(0) { rc = int32(SQLITE_ERROR) - _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38127, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg)))) + _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38234, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg)))) } else { xCreate = uintptr(0) if (*TFts5TokenizerModule)(unsafe.Pointer(pMod)).FbV2Native != 0 { @@ -219356,7 +219838,7 @@ func _sqlite3Fts5LoadTokenizer(tls *libc.TLS, pConfig uintptr) (r int32) { rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{xCreate})))(tls, (*TFts5TokenizerModule)(unsafe.Pointer(pMod)).FpUserData, v2, v3, pConfig+128) if rc != SQLITE_OK { if rc != int32(SQLITE_NOMEM) { - _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38149, 0) + _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38256, 0) } } else { if (*TFts5TokenizerModule)(unsafe.Pointer(pMod)).FbV2Native == 0 { @@ -219427,7 +219909,7 @@ func _fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { _, _ = pGlobal, ppApi pGlobal = Xsqlite3_user_data(tls, pCtx) _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), __ccgo_ts+38180) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), __ccgo_ts+38287) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } @@ -219441,7 +219923,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, __ccgo_ts+38193, -int32(1), uintptr(-libc.Int32FromInt32(1))) + Xsqlite3_result_text(tls, pCtx, __ccgo_ts+38300, -int32(1), uintptr(-libc.Int32FromInt32(1))) } // C documentation @@ -219538,11 +220020,11 @@ func _fts5ShadowName(tls *libc.TLS, zName uintptr) (r int32) { } var _azName2 = [5]uintptr{ - 0: __ccgo_ts + 38284, - 1: __ccgo_ts + 35495, - 2: __ccgo_ts + 26001, - 3: __ccgo_ts + 36190, - 4: __ccgo_ts + 11982, + 0: __ccgo_ts + 38391, + 1: __ccgo_ts + 35602, + 2: __ccgo_ts + 26056, + 3: __ccgo_ts + 36297, + 4: __ccgo_ts + 12007, } // C documentation @@ -219564,7 +220046,7 @@ func _fts5IntegrityMethod(tls *libc.TLS, pVtab uintptr, zSchema uintptr, zTabnam rc = _sqlite3Fts5StorageIntegrity(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage, 0) if *(*uintptr)(unsafe.Pointer(pzErr)) == uintptr(0) && rc != SQLITE_OK { if rc&int32(0xff) == int32(SQLITE_CORRUPT) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38291, libc.VaList(bp+8, zSchema, zTabname)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38398, libc.VaList(bp+8, zSchema, zTabname)) if *(*uintptr)(unsafe.Pointer(pzErr)) != 0 { v1 = SQLITE_OK } else { @@ -219572,7 +220054,7 @@ func _fts5IntegrityMethod(tls *libc.TLS, pVtab uintptr, zSchema uintptr, zTabnam } rc = v1 } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38337, libc.VaList(bp+8, zSchema, zTabname, Xsqlite3_errstr(tls, rc))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38444, libc.VaList(bp+8, zSchema, zTabname, Xsqlite3_errstr(tls, rc))) } } _sqlite3Fts5IndexCloseReader(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) @@ -219605,7 +220087,7 @@ func _fts5Init(tls *libc.TLS, db uintptr) (r int32) { *(*Tu32)(unsafe.Pointer(pGlobal + 96 + 1*4)) ^= uint32(0x16596E13) *(*Tu32)(unsafe.Pointer(pGlobal + 96 + 2*4)) ^= uint32(0x7C80BEAA) *(*Tu32)(unsafe.Pointer(pGlobal + 96 + 3*4)) ^= uint32(0x9B03A67F) - rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+38400, uintptr(unsafe.Pointer(&_fts5Mod)), p, __ccgo_fp(_fts5ModuleDestroy)) + rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+38507, uintptr(unsafe.Pointer(&_fts5Mod)), p, __ccgo_fp(_fts5ModuleDestroy)) if rc == SQLITE_OK { rc = _sqlite3Fts5IndexInit(tls, db) } @@ -219622,16 +220104,16 @@ func _fts5Init(tls *libc.TLS, db uintptr) (r int32) { rc = _sqlite3Fts5VocabInit(tls, pGlobal, db) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38400, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_fts5Fts5Func), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38507, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_fts5Fts5Func), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38405, 0, libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_DETERMINISTIC)|libc.Int32FromInt32(SQLITE_INNOCUOUS), p, __ccgo_fp(_fts5SourceIdFunc), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38512, 0, libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_DETERMINISTIC)|libc.Int32FromInt32(SQLITE_INNOCUOUS), p, __ccgo_fp(_fts5SourceIdFunc), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38420, int32(2), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)|libc.Int32FromInt32(SQLITE_SUBTYPE), p, __ccgo_fp(_fts5LocaleFunc), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38527, int32(2), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)|libc.Int32FromInt32(SQLITE_SUBTYPE), p, __ccgo_fp(_fts5LocaleFunc), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38432, int32(1), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE), p, __ccgo_fp(_fts5InsttokenFunc), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38539, int32(1), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE), p, __ccgo_fp(_fts5InsttokenFunc), uintptr(0), uintptr(0)) } } /* If SQLITE_FTS5_ENABLE_TEST_MI is defined, assume that the file @@ -219762,18 +220244,18 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, ** statements to operate on it. */ if *(*uintptr)(unsafe.Pointer(p + 48 + uintptr(eStmt)*8)) == uintptr(0) { azStmt = [12]uintptr{ - 0: __ccgo_ts + 38447, - 1: __ccgo_ts + 38515, - 2: __ccgo_ts + 38584, - 3: __ccgo_ts + 38584, - 4: __ccgo_ts + 38617, - 5: __ccgo_ts + 38656, - 6: __ccgo_ts + 38696, - 7: __ccgo_ts + 38735, - 8: __ccgo_ts + 38778, - 9: __ccgo_ts + 38817, - 10: __ccgo_ts + 38861, - 11: __ccgo_ts + 38901, + 0: __ccgo_ts + 38554, + 1: __ccgo_ts + 38622, + 2: __ccgo_ts + 38691, + 3: __ccgo_ts + 38691, + 4: __ccgo_ts + 38724, + 5: __ccgo_ts + 38763, + 6: __ccgo_ts + 38803, + 7: __ccgo_ts + 38842, + 8: __ccgo_ts + 38885, + 9: __ccgo_ts + 38924, + 10: __ccgo_ts + 38968, + 11: __ccgo_ts + 39008, } pC = (*TFts5Storage)(unsafe.Pointer(p)).FpConfig zSql = uintptr(0) @@ -219803,11 +220285,11 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, } if !(i != 0) || (*TFts5Config)(unsafe.Pointer(pC)).FeContent == FTS5_CONTENT_NORMAL || *(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pC)).FabUnindexed + uintptr(i-int32(1)))) != 0 { if zBind != 0 { - v2 = __ccgo_ts + 13279 + v2 = __ccgo_ts + 13304 } else { v2 = __ccgo_ts + 1665 } - zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+38924, libc.VaList(bp+16, zBind, v2, i+int32(1))) + zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+39031, libc.VaList(bp+16, zBind, v2, i+int32(1))) } goto _1 _1: @@ -219823,7 +220305,7 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, break } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pC)).FabUnindexed + uintptr(i)))) == 0 { - zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+38932, libc.VaList(bp+16, zBind, (*TFts5Config)(unsafe.Pointer(pC)).FnCol+i+int32(2))) + zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+39039, libc.VaList(bp+16, zBind, (*TFts5Config)(unsafe.Pointer(pC)).FnCol+i+int32(2))) } goto _3 _3: @@ -219835,14 +220317,14 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, Xsqlite3_free(tls, zBind) case int32(FTS5_STMT_REPLACE_DOCSIZE): if (*TFts5Config)(unsafe.Pointer(pC)).FbContentlessDelete != 0 { - v4 = __ccgo_ts + 38939 + v4 = __ccgo_ts + 39046 } else { v4 = __ccgo_ts + 1665 } zSql = Xsqlite3_mprintf(tls, azStmt[eStmt], libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pC)).FzDb, (*TFts5Config)(unsafe.Pointer(pC)).FzName, v4)) case int32(FTS5_STMT_LOOKUP_DOCSIZE): if (*TFts5Config)(unsafe.Pointer(pC)).FbContentlessDelete != 0 { - v5 = __ccgo_ts + 38942 + v5 = __ccgo_ts + 39049 } else { v5 = __ccgo_ts + 1665 } @@ -219863,7 +220345,7 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, (*TFts5Config)(unsafe.Pointer((*TFts5Storage)(unsafe.Pointer(p)).FpConfig)).FbLock-- Xsqlite3_free(tls, zSql) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK && pzErrMsg != 0 { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3862, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3888, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pC)).Fdb))) } if *(*int32)(unsafe.Pointer(bp)) == int32(SQLITE_ERROR) && eStmt > int32(FTS5_STMT_LOOKUP2) && eStmt < int32(FTS5_STMT_SCAN) { /* One of the internal tables - not the %_content table - is missing. @@ -219905,12 +220387,12 @@ func _sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) (r int32) { defer tls.Free(64) var rc int32 _ = rc - rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+38950, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39057, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39054, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39161, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39092, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39199, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } @@ -219919,7 +220401,7 @@ func _fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail ui bp := tls.Alloc(48) defer tls.Free(48) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(pRc)) = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39130, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) + *(*int32)(unsafe.Pointer(pRc)) = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39237, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } @@ -219931,14 +220413,14 @@ func _sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) ( _ = pConfig pConfig = (*TFts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5StorageSync(tls, pStorage) - _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+26001, zName) - _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+11982, zName) - _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+38284, zName) + _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+26056, zName) + _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+12007, zName) + _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+38391, zName) if (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+36190, zName) + _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+36297, zName) } if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+35495, zName) + _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+35602, zName) } return *(*int32)(unsafe.Pointer(bp)) } @@ -219958,13 +220440,13 @@ func _sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDef _, _ = rc, v1 *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) if bWithout != 0 { - v1 = __ccgo_ts + 30641 + v1 = __ccgo_ts + 30696 } else { v1 = __ccgo_ts + 1665 } - rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, bp, __ccgo_ts+39172, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, v1)) + rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, bp, __ccgo_ts+39279, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, v1)) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+39202, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+39309, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp))) } return rc @@ -220005,7 +220487,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr if zDefn == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { - Xsqlite3_snprintf(tls, nDefn, zDefn, __ccgo_ts+39246, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, __ccgo_ts+39353, 0) iOff = libc.Int32FromUint64(libc.Xstrlen(tls, zDefn)) i = 0 for { @@ -220013,7 +220495,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr break } if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL || *(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(i))) != 0 { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39269, libc.VaList(bp+8, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39376, libc.VaList(bp+8, i)) iOff += libc.Int32FromUint64(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } goto _2 @@ -220028,7 +220510,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr break } if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(i)))) == 0 { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39275, libc.VaList(bp+8, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39382, libc.VaList(bp+8, i)) iOff += libc.Int32FromUint64(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } goto _3 @@ -220037,22 +220519,22 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr i++ } } - rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+35495, zDefn, 0, pzErr) + rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+35602, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - zCols = __ccgo_ts + 39281 + zCols = __ccgo_ts + 39388 if (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete != 0 { - zCols = __ccgo_ts + 39313 + zCols = __ccgo_ts + 39420 } - rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+36190, zCols, 0, pzErr) + rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+36297, zCols, 0, pzErr) } if rc == SQLITE_OK { - rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+38284, __ccgo_ts+39361, int32(1), pzErr) + rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+38391, __ccgo_ts+39468, int32(1), pzErr) } if rc == SQLITE_OK { - rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36372, uintptr(0), int32(FTS5_CURRENT_VERSION)) + rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36479, uintptr(0), int32(FTS5_CURRENT_VERSION)) } } if rc != 0 { @@ -220472,12 +220954,12 @@ func _sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) (r int32) { pConfig = (*TFts5Storage)(unsafe.Pointer(p)).FpConfig (*TFts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 /* Delete the contents of the %_data and %_docsize tables. */ - rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39378, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39485, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39428, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39535, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == int32(FTS5_CONTENT_UNINDEXED) { - rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39457, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) + rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39564, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)) } /* Reinitialize the %_data table. This call creates the initial structure ** and averages records. */ @@ -220485,7 +220967,7 @@ func _sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) (r int32) { rc = _sqlite3Fts5IndexReinit(tls, (*TFts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36372, uintptr(0), int32(FTS5_CURRENT_VERSION)) + rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36479, uintptr(0), int32(FTS5_CURRENT_VERSION)) } return rc } @@ -220787,7 +221269,7 @@ func _fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var _ /* pCnt at bp+0 */ uintptr _, _, _ = pConfig, rc, zSql pConfig = (*TFts5Storage)(unsafe.Pointer(p)).FpConfig - zSql = Xsqlite3_mprintf(tls, __ccgo_ts+39486, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) + zSql = Xsqlite3_mprintf(tls, __ccgo_ts+39593, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = int32(SQLITE_NOMEM) } else { @@ -221019,14 +221501,14 @@ func _sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) (r int32 ** number of rows. */ if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*Ti64)(unsafe.Pointer(bp + 80)) = 0 - rc = _fts5StorageCount(tls, p, __ccgo_ts+35495, bp+80) + rc = _fts5StorageCount(tls, p, __ccgo_ts+35602, bp+80) if rc == SQLITE_OK && *(*Ti64)(unsafe.Pointer(bp + 80)) != (*TFts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8) } } if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*Ti64)(unsafe.Pointer(bp + 88)) = 0 - rc = _fts5StorageCount(tls, p, __ccgo_ts+36190, bp+88) + rc = _fts5StorageCount(tls, p, __ccgo_ts+36297, bp+88) if rc == SQLITE_OK && *(*Ti64)(unsafe.Pointer(bp + 88)) != (*TFts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8) } @@ -221395,10 +221877,10 @@ func _fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, break } zArg = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39518) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39625) { _fts5AsciiAddExceptions(tls, p, zArg, int32(1)) } else { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39529) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39636) { _fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = int32(SQLITE_ERROR) @@ -221678,7 +222160,7 @@ func _fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int3 } else { p = Xsqlite3_malloc(tls, int32(192)) if p != 0 { - zCat = __ccgo_ts + 39540 + zCat = __ccgo_ts + 39647 libc.Xmemset(tls, p, 0, uint64(192)) (*TUnicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(FTS5_REMOVE_DIACRITICS_SIMPLE) (*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnFold = int32(64) @@ -221692,7 +222174,7 @@ func _fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int3 if !(rc == SQLITE_OK && i < nArg) { break } - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39549) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39656) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*8)) } goto _1 @@ -221709,20 +222191,20 @@ func _fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int3 break } zArg = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39560) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39667) { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('2') || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = int32(SQLITE_ERROR) } else { (*TUnicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - int32('0') } } else { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39518) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39625) { rc = _fts5UnicodeAddExceptions(tls, p, zArg, int32(1)) } else { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39529) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39636) { rc = _fts5UnicodeAddExceptions(tls, p, zArg, 0) } else { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39549) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39656) { /* no-op */ } else { rc = int32(SQLITE_ERROR) @@ -222014,7 +222496,7 @@ func _fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, p pApi = pCtx rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) - zBase = __ccgo_ts + 39578 + zBase = __ccgo_ts + 39685 *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -222231,64 +222713,64 @@ func _fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { nBuf = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) { case int32('a'): - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39588, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39695, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) } } case int32('c'): - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39591, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39698, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) } } else { - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39596, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39703, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) } } } case int32('e'): - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39601, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39708, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) } } case int32('i'): - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39604, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39711, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) } } case int32('l'): - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39607, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39714, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) } } else { - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39612, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39719, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) } } } case int32('n'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39617, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39724, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } else { - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39621, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39728, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(5)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) } } else { - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39627, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39734, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) } } else { - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39632, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39739, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } @@ -222297,49 +222779,49 @@ func _fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { } } case int32('o'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39636, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39743, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } else { - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39640, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39747, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) } } } case int32('s'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39643, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39750, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } case int32('t'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39647, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39754, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } else { - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39651, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39758, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } } case int32('u'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39655, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39762, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } case int32('v'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39659, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39766, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } case int32('z'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39663, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39770, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } @@ -222356,20 +222838,20 @@ func _fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { nBuf = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) { case int32('a'): - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39667, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39647, uint64(3)) + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39774, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39754, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) + int32(3) ret = int32(1) } case int32('b'): - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39670, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39673, uint64(3)) + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39777, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39780, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) + int32(3) ret = int32(1) } case int32('i'): - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39677, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39663, uint64(3)) + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39784, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39770, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) + int32(3) ret = int32(1) } @@ -222385,75 +222867,75 @@ func _fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { nBuf = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) { case int32('a'): - if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39680, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { + if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39787, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39647, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39754, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3) } } else { - if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39688, aBuf+uintptr(nBuf-int32(6)), uint64(6)) { + if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39795, aBuf+uintptr(nBuf-int32(6)), uint64(6)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(6)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39695, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39802, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(6) + int32(4) } } } case int32('c'): - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39700, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39807, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39596, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39703, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(4) } } else { - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39705, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39812, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39591, uint64(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39698, uint64(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(4) } } } case int32('e'): - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39710, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39817, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39663, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39770, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(3) } } case int32('g'): - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39715, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39822, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+16050, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+16122, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(3) } } case int32('l'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39720, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39827, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39673, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39780, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) + int32(3) } } else { - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39724, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39831, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39588, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39695, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(2) } } else { - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39729, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39836, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39632, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39739, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3) } } else { - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39735, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39842, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39739, uint64(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39846, uint64(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) + int32(1) } } else { - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39741, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39848, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39655, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39762, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3) } } @@ -222462,48 +222944,48 @@ func _fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { } } case int32('o'): - if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39747, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { + if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39854, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39663, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39770, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3) } } else { - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39755, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39862, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39647, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39754, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3) } } else { - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39761, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39868, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39647, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39754, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(3) } } } } case int32('s'): - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39766, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39873, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39588, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39695, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2) } } else { - if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39772, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { + if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39879, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39659, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39766, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3) } } else { - if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39780, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { + if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39887, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39788, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39895, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3) } } else { - if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39792, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { + if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39899, aBuf+uintptr(nBuf-int32(7)), uint64(7)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39655, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39762, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3) } } @@ -222511,21 +222993,21 @@ func _fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { } } case int32('t'): - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39800, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39907, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39588, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39695, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2) } } else { - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39806, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39913, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39659, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39766, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3) } } else { - if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39812, aBuf+uintptr(nBuf-int32(6)), uint64(6)) { + if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39919, aBuf+uintptr(nBuf-int32(6)), uint64(6)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(6)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39673, uint64(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39780, uint64(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(6) + int32(3) } } @@ -222543,48 +223025,48 @@ func _fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { nBuf = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) { case int32('a'): - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39819, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39926, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39604, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39711, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(2) } } case int32('s'): - if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39824, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { + if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39931, aBuf+uintptr(nBuf-int32(4)), uint64(4)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) } } case int32('t'): - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39829, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39936, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39604, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39711, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2) } } else { - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39835, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39942, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39604, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39711, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2) } } } case int32('u'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39788, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39895, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) } } case int32('v'): - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39841, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39948, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) } } case int32('z'): - if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39847, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { + if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39954, aBuf+uintptr(nBuf-int32(5)), uint64(5)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39588, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39695, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2) } } @@ -222600,13 +223082,13 @@ func _fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { nBuf = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) { case int32('e'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39853, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39960, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39857, uint64(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39964, uint64(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) + int32(2) } } else { - if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39860, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { + if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39967, aBuf+uintptr(nBuf-int32(2)), uint64(2)) { if _fts5Porter_Vowel(tls, aBuf, nBuf-int32(2)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) ret = int32(1) @@ -222614,7 +223096,7 @@ func _fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) { } } case int32('n'): - if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39863, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { + if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39970, aBuf+uintptr(nBuf-int32(3)), uint64(3)) { if _fts5Porter_Vowel(tls, aBuf, nBuf-int32(3)) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) ret = int32(1) @@ -222779,14 +223261,14 @@ func _fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, p break } zArg = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*8)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39867) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39974) { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = int32(SQLITE_ERROR) } else { (*TTrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('0')) } } else { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39560) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), __ccgo_ts+39667) { if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('2') || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = int32(SQLITE_ERROR) } else { @@ -223054,7 +223536,7 @@ func _sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) // ** called for the first time in order to correctly handle LIKE/GLOB. // */ func _sqlite3Fts5TokenizerPreload(tls *libc.TLS, p uintptr) (r int32) { - return libc.BoolInt32((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FnArg >= int32(1) && 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FazArg)), __ccgo_ts+39882)) + return libc.BoolInt32((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FnArg >= int32(1) && 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FazArg)), __ccgo_ts+39989)) } // C documentation @@ -223080,7 +223562,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) { Fx Tfts5_tokenizer }{ 0: { - FzName: __ccgo_ts + 39578, + FzName: __ccgo_ts + 39685, Fx: Tfts5_tokenizer{ FxCreate: __ccgo_fp(_fts5UnicodeCreate), FxDelete: __ccgo_fp(_fts5UnicodeDelete), @@ -223088,7 +223570,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) { }, }, 1: { - FzName: __ccgo_ts + 39890, + FzName: __ccgo_ts + 39997, Fx: Tfts5_tokenizer{ FxCreate: __ccgo_fp(_fts5AsciiCreate), FxDelete: __ccgo_fp(_fts5AsciiDelete), @@ -223096,7 +223578,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) { }, }, 2: { - FzName: __ccgo_ts + 39882, + FzName: __ccgo_ts + 39989, Fx: Tfts5_tokenizer{ FxCreate: __ccgo_fp(_fts5TriCreate), FxDelete: __ccgo_fp(_fts5TriDelete), @@ -223126,7 +223608,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) { FxDelete: __ccgo_fp(_fts5PorterDelete), FxTokenize: __ccgo_fp(_fts5PorterTokenize), } - rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tfts5_api)(unsafe.Pointer(pApi)).FxCreateTokenizer_v2})))(tls, pApi, __ccgo_ts+39896, pApi, bp+96, uintptr(0)) + rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tfts5_api)(unsafe.Pointer(pApi)).FxCreateTokenizer_v2})))(tls, pApi, __ccgo_ts+40003, pApi, bp+96, uintptr(0)) } return rc } @@ -228642,16 +229124,16 @@ func _fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uin zCopy = _sqlite3Fts5Strndup(tls, bp, zType, -int32(1)) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { _sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+39903) == 0 { + if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+40010) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL } else { - if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+39907) == 0 { + if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+40014) == 0 { *(*int32)(unsafe.Pointer(peType)) = int32(FTS5_VOCAB_ROW) } else { - if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+39911) == 0 { + if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+40018) == 0 { *(*int32)(unsafe.Pointer(peType)) = int32(FTS5_VOCAB_INSTANCE) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+39920, libc.VaList(bp+16, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+40027, libc.VaList(bp+16, zCopy)) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } } @@ -228714,21 +229196,22 @@ func _fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg bp := tls.Alloc(16) defer tls.Free(16) var azSchema [3]uintptr - var bDb, nByte, nDb, nTab int32 + var bDb int32 + var nByte, nDb, nTab Ti64 var pRet, zDb, zTab, zType, v1, v2, v3 uintptr var _ /* eType at bp+4 */ int32 var _ /* rc at bp+0 */ int32 _, _, _, _, _, _, _, _, _, _, _, _ = azSchema, bDb, nByte, nDb, nTab, pRet, zDb, zTab, zType, v1, v2, v3 azSchema = [3]uintptr{ - 0: __ccgo_ts + 39954, - 1: __ccgo_ts + 39994, - 2: __ccgo_ts + 40029, + 0: __ccgo_ts + 40061, + 1: __ccgo_ts + 40101, + 2: __ccgo_ts + 40136, } pRet = uintptr(0) *(*int32)(unsafe.Pointer(bp)) = SQLITE_OK - bDb = libc.BoolInt32(argc == int32(6) && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, __ccgo_ts+23977, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) + bDb = libc.BoolInt32(argc == int32(6) && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4) && libc.Xmemcmp(tls, __ccgo_ts+24049, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0) if argc != int32(5) && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+40072, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+40179, 0) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } else { if bDb != 0 { @@ -228749,23 +229232,23 @@ func _fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg v3 = *(*uintptr)(unsafe.Pointer(argv + 4*8)) } zType = v3 - nDb = libc.Int32FromUint64(libc.Xstrlen(tls, zDb)) + int32(1) - nTab = libc.Int32FromUint64(libc.Xstrlen(tls, zTab)) + int32(1) + nDb = libc.Int64FromUint64(libc.Xstrlen(tls, zDb) + uint64(1)) + nTab = libc.Int64FromUint64(libc.Xstrlen(tls, zTab) + uint64(1)) *(*int32)(unsafe.Pointer(bp + 4)) = 0 *(*int32)(unsafe.Pointer(bp)) = _fts5VocabTableType(tls, zType, pzErr, bp+4) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp)) = Xsqlite3_declare_vtab(tls, db, azSchema[*(*int32)(unsafe.Pointer(bp + 4))]) } - nByte = libc.Int32FromUint64(uint64(64) + libc.Uint64FromInt32(nDb) + libc.Uint64FromInt32(nTab)) - pRet = _sqlite3Fts5MallocZero(tls, bp, int64(nByte)) + nByte = libc.Int64FromUint64(uint64(64) + libc.Uint64FromInt64(nDb) + libc.Uint64FromInt64(nTab)) + pRet = _sqlite3Fts5MallocZero(tls, bp, nByte) if pRet != 0 { (*TFts5VocabTable)(unsafe.Pointer(pRet)).FpGlobal = pAux (*TFts5VocabTable)(unsafe.Pointer(pRet)).FeType = *(*int32)(unsafe.Pointer(bp + 4)) (*TFts5VocabTable)(unsafe.Pointer(pRet)).Fdb = db (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl = pRet + 1*64 (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db = (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl + uintptr(nTab) - libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl, zTab, libc.Uint64FromInt32(nTab)) - libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db, zDb, libc.Uint64FromInt32(nDb)) + libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl, zTab, libc.Uint64FromInt64(nTab)) + libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db, zDb, libc.Uint64FromInt64(nDb)) _sqlite3Fts5Dequote(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl) _sqlite3Fts5Dequote(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db) } @@ -228898,10 +229381,10 @@ func _fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) (r int32) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) zSql = uintptr(0) if (*TFts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { - (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40105, libc.VaList(bp+24, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40212, libc.VaList(bp+24, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return int32(SQLITE_ERROR) } - zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+40136, libc.VaList(bp+24, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+40243, libc.VaList(bp+24, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v2(tls, (*TFts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -int32(1), bp+8, uintptr(0)) } @@ -228920,7 +229403,7 @@ func _fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) (r int32) *(*int32)(unsafe.Pointer(bp)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) *(*uintptr)(unsafe.Pointer(bp + 8)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40187, libc.VaList(bp+24, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40294, libc.VaList(bp+24, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR) } } else { @@ -229370,7 +229853,7 @@ func _sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) (r int32) var p uintptr _ = p p = pGlobal - return Xsqlite3_create_module_v2(tls, db, __ccgo_ts+40213, uintptr(unsafe.Pointer(&_fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, __ccgo_ts+40320, uintptr(unsafe.Pointer(&_fts5Vocab)), p, uintptr(0)) } var _fts5Vocab = Tsqlite3_module{ @@ -229425,7 +229908,7 @@ func init() { // /************** End of stmt.c ************************************************/ // /* Return the source-id for this library */ func Xsqlite3_sourceid(tls *libc.TLS) (r uintptr) { - return __ccgo_ts + 40223 + return __ccgo_ts + 40330 } type TAggInfo_col = struct { @@ -229655,7 +230138,7 @@ var Xsqlite3_temp_directory uintptr ** ** Since [version 3.6.18] ([dateof:3.6.18]), ** SQLite source code has been stored in the -** <a href="http://www.fossil-scm.org/">Fossil configuration management +** <a href="http://fossil-scm.org/">Fossil configuration management ** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to ** a string which identifies a particular check-in of SQLite ** within its configuration management system. ^The SQLITE_SOURCE_ID @@ -229703,11 +230186,11 @@ var Xsqlite3_temp_directory uintptr // ** // ** See also: [sqlite_version()] and [sqlite_source_id()]. // */ -var Xsqlite3_version = [7]int8{'3', '.', '4', '9', '.', '2'} +var Xsqlite3_version = [7]int8{'3', '.', '5', '0', '.', '1'} var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data -var __ccgo_ts1 = "ATOMIC_INTRINSICS=0\x00COMPILER=clang-18.1.6\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\x00DIRECT_OVERFLOW_READ\x00ENABLE_COLUMN_METADATA\x00ENABLE_DBSTAT_VTAB\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=1000\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=0xfffffffe\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\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00subsec\x00subsecond\x00local time unavailable\x00auto\x00ceiling\x00floor\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x0040f\x0050f\x0040f-20a-20d\x0050f-20a-20d\x00%02d\x00%2d\x00%06.3f\x00%04d-%02d-%02d\x00%04d\x00%03d\x00%.16g\x00PM\x00pm\x00AM\x00am\x00%02d:%02d\x00%.3f\x00%lld\x00%02d:%02d:%02d\x00%c%04d-%02d-%02d %02d:%02d:%06.3f\x00date\x00time\x00datetime\x00strftime\x00timediff\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x00%\x00null\x00NaN\x00-Inf\x00\x00NULL\x00(NULL)\x00.\x00(join-%u)\x00%u-ROW VALUES CLAUSE\x00(subquery-%u)\x00unrecognized token: \"%s\"\x00922337203685477580\x00+- \n\t0123456789\x000\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\x00IfSizeBetween\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\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\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\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\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VCheck\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00GetSubtype\x00SetSubtype\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\x00BEGIN IMMEDIATE; COMMIT;\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\x00:memory:\x00@ \x00\n\x00invalid page number %u\x002nd reference to page %u\x00Failed to read ptrmap key=%u\x00Bad ptr map entry key=%u expected=(%u,%u) got=(%u,%u)\x00failed to get page %u\x00freelist leaf count too big on page %u\x00size\x00overflow list length\x00%s is %u but should be %u\x00Tree %u page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00Tree %u page %u cell %u: \x00Tree %u page %u right child: \x00Offset %u out of range %u..%u\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %u bytes reported as %u on page %u\x00Freelist: \x00max rootpage (%u) disagrees with header (%u)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %u: never used\x00Page %u: pointer map referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00BINARY\x00B\x00N.\x00,%s%s%s\x00)\x00?\x008\x0016LE\x0016BE\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00subrtnsig:%d,%s\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\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\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\x00into\x00out of\x00cannot change %s wal mode from within a transaction\x00database table is locked: %s\x00ValueList\x00-- %s\x00statement aborts at %d: [%s] %s\x00real\x00integer\x00cannot open value of type %s\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open table with generated columns: %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\" - should this be a string literal in single-quotes?\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\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)\x00s\x00IN(...) element has %d term%s - expected %d\x00too many arguments on function %T\x00ORDER BY may not be used with non-aggregate %#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\x00true\x00false\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\x00CORRELATED \x00%sLIST SUBQUERY %d\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\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') WHEN quick_check GLOB 'non-* value in*' THEN raise(ABORT,'type mismatch on DEFAULT') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*' OR quick_check GLOB 'non-* value in*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00drop column from\x00rename columns of\x00cannot %s %s \"%s\"\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')\x00 \x00error in %s %s%s%s: %s\x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00PRIMARY KEY\x00cannot drop %s column: \"%s\"\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\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\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 COLLATE nocase\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\x00cannot use RETURNING in a trigger\x00sqlite_returning_%p\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'\x00SELECT*FROM\"%w\".\"%w\"\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\x00FIRST\x00LAST\x00unsupported use of NULLS %s\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\x00 UNIQUE\x00CREATE%s INDEX %.*s\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\x00ON\x00USING\x00a JOIN clause is required before %s\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%!0.15g\x00%!0.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\x00octet_length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00unhex\x00concat\x00concat_ws\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\x00string_agg\x00glob\x00ceil\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\x00if\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00SCAN %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\x00so\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]\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00builtin\x00enc\x00narg\x00flags\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00unique\x00origin\x00partial\x00wdth\x00hght\x00flgs\x00rowid\x00fkid\x00busy\x00checkpointed\x00file\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\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\x00utf8\x00utf16le\x00utf16be\x00w\x00a\x00sissii\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\x00wrong # of entries in index \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 \x00rowid not at end-of-record for row \x00 of index \x00 values differ from index \x00non-unique entry in index \x00ok\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00rename\x00drop column\x00add column\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\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\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()\x00CREATE BLOOM FILTER\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00LAST TERM OF \x00USE TEMP B-TREE FOR %sORDER BY\x00USE TEMP B-TREE FOR LAST %d TERMS OF ORDER BY\x00column%d\x00%.*z:%u\x00NUM\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00S\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%s\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00USE TEMP B-TREE FOR %s(ORDER BY)\x00 USING COVERING INDEX \x00SCAN %s%s%s\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\x00cannot create triggers on shadow tables\x00trigger %T already exists\x00cannot create trigger on system table\x00BEFORE\x00AFTER\x00cannot create %s trigger on view: %S\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'\x00DELETE\x00UPDATE\x00%s RETURNING is not available on virtual tables\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\x00vacuum_%016llx\x00ATTACH %Q AS %s\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 %s.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM %s.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO %s.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\x00syntax error\x00<expr>\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00SEARCH\x00SCAN\x00%s %S\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 \x000x%x:%s\x00%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\x00internal query planner error\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\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\x00near \"%T\": syntax error\x00ORDER BY\x00LIMIT\x00%s clause should come after %s not before\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00unknown table option: %.*s\x00set list\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\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\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\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\x00shared\x00private\x00mode\x00ro\x00rw\x00rwc\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\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\x00inf\x009.0e999\x00infinity\x00QNaN\x00SNaN\x00json_%s() needs an odd number of arguments\x00\"\\/bfnrt\x00-9e999\x009e999\x00inity\x00\\\"\x00\\u0009\x00\\u00\x00\\u0000\x00,\n\x00: \x00bad JSON path: %Q\x00@\x00[\x00#\x00.\"\x00\"\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00 \x00FLAGS parameter to json_valid() must be between 1 and 15\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%lld]\x00.\"%.*s\"\x00.%.*s\x00$\x00json\x00jsonb\x00json_array\x00jsonb_array\x00json_array_length\x00json_error_position\x00json_extract\x00jsonb_extract\x00->\x00->>\x00json_insert\x00jsonb_insert\x00json_object\x00jsonb_object\x00json_patch\x00jsonb_patch\x00json_pretty\x00json_quote\x00json_remove\x00jsonb_remove\x00json_replace\x00jsonb_replace\x00json_set\x00jsonb_set\x00json_type\x00json_valid\x00json_group_array\x00jsonb_group_array\x00json_group_object\x00jsonb_group_object\x00json_each\x00json_tree\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\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\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\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\x00_node\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00,%.*s REAL\x00,%.*s INT\x00);\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\x00%_rowid\x00%_parent\x00Mapping (%lld -> %lld) missing from %s table\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\x00In RTree %s.%s:\n%z\x00wrong number of arguments to function rtreecheck()\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_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00geopoly\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;\x00AND rootpage!=0 AND rootpage IS NOT NULL\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\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\x00may not have\x00requires\x00table %q %s rbu_rowid column\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 NOT NULL\x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00%z, %z\x00 WITHOUT ROWID\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\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\x00AND\x00WHERE\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\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_\x00, _rowid_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00, 0 AS rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\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\x000 AS \x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\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\x00&\x00file:%s-vactmp?rbu_memory=1%s%s\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, %lld), (%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\x00vacuum\x00update\x00database modified during rbu %s\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00/\x00overflow\x00%s%.3x+%.6x\x00%s%.3x/\x00internal\x00leaf\x00corrupted\x00SELECT * FROM (SELECT 'sqlite_schema' AS name,1 AS rootpage,'table' AS type UNION ALL SELECT name,rootpage,type FROM \"%w\".sqlite_schema WHERE rootpage!=0)\x00WHERE name=%Q\x00 ORDER BY name\x00dbstat\x00SELECT 0, 'tbl', '', 0, '', 1, 0 UNION ALL SELECT 1, 'idx', '', 0, '', 2, 0 UNION ALL SELECT 2, 'stat', '', 0, '', 0, 0\x00PRAGMA '%q'.table_xinfo('%q')\x00SELECT\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00_rowid_, *\x00SELECT %s FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00%z%s\"%w\".\"%w\".\"%w\"\x00SELECT %s,%s FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00, 1\x00 AND (?6 OR ?3 IS stat)\x00tbl, idx\x00?1, (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00tbl, ?2, stat\x00?%d\x00 AND (?%d OR ?%d IS %w.%w)\x00SELECT %s%s FROM %Q.%Q WHERE (%s) IS (%s)\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00 WHERE \x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00 IS ?\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()\x00wrong number of arguments to function fts5_get_locale()\x00non-integer argument passed to function fts5_get_locale()\x00snippet\x00highlight\x00bm25\x00fts5_get_locale\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\x00contentless_delete\x00malformed contentless_delete=... directive\x00contentless_unindexed\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00locale\x00malformed locale=... directive\x00columns\x00malformed detail=... directive\x00tokendata\x00malformed tokendata=... directive\x00unrecognized option: \"%.*s\"\x00rank\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00, NULL\x00, T.l%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00contentless_delete=1 requires a contentless table\x00contentless_delete=1 is incompatible with columnsize=0\x00contentless_unindexed=1 requires a contentless table\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00deletemerge\x00secure-delete\x00insttoken\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d or %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)\x00phrase\x00fts5: %s queries are not supported (detail!=full)\x00fts5 expression tree is too large (maximum depth %d)\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=?\x00\xff\x00\x00\x01\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term>? ORDER BY term ASC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00DELETE FROM '%q'.'%q_idx' WHERE (segid, (pgno/2)) = (?1, ?2)\x00REPLACE INTO %Q.'%q_config' VALUES ('version', %d)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00\x00\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\x00DESC\x00ASC\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%.*s\x00%s: table does not support scanning\x00fts5: missing row %lld from content table %s\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\x00flush\x00%s a subset of columns on fts5 contentless-delete table: %s\x00%s contentless fts5 table: %s\x00cannot UPDATE\x00'delete' may not be used with a contentless_delete=1 table\x00cannot DELETE from contentless fts5 table: %s\x00fts5_locale() requires locale=1\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1\x00config\x00malformed inverted index for FTS5 table %s.%s\x00unable to validate the inverted index for FTS5 table %s.%s: %s\x00fts5\x00fts5_source_id\x00fts5_locale\x00fts5_insttoken\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(?,?%s)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz%s FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00%z%s?%d\x00%z,?%d\x00,?\x00,origin\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\x00, l%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00id INTEGER PRIMARY KEY, sz BLOB, origin INTEGER\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00DELETE FROM %Q.'%q_content';\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\x00trigram\x00ascii\x00porter\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\x002025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1\x00" +var __ccgo_ts1 = "ATOMIC_INTRINSICS=0\x00COMPILER=clang-18.1.6\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\x00DIRECT_OVERFLOW_READ\x00ENABLE_COLUMN_METADATA\x00ENABLE_DBSTAT_VTAB\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=1000\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=0xfffffffe\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\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00subsec\x00subsecond\x00local time unavailable\x00auto\x00ceiling\x00floor\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x0040f\x0050f\x0040f-20a-20d\x0050f-20a-20d\x00%02d\x00%2d\x00%06.3f\x00%04d-%02d-%02d\x00%04d\x00%03d\x00%.16g\x00PM\x00pm\x00AM\x00am\x00%02d:%02d\x00%.3f\x00%lld\x00%02d:%02d:%02d\x00%c%04d-%02d-%02d %02d:%02d:%06.3f\x00date\x00time\x00datetime\x00strftime\x00timediff\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x00%\x00null\x00NaN\x00-Inf\x00\x00NULL\x00(NULL)\x00unistr('\x000123456789abcdef\x00.\x00(join-%u)\x00%u-ROW VALUES CLAUSE\x00(subquery-%u)\x00unrecognized token: \"%s\"\x00922337203685477580\x00+- \n\t0123456789\x000\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\x00IfSizeBetween\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\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\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\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\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VCheck\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00GetSubtype\x00SetSubtype\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\x00BEGIN IMMEDIATE; COMMIT;\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\x00:memory:\x00@ \x00\n\x00invalid page number %u\x002nd reference to page %u\x00Failed to read ptrmap key=%u\x00Bad ptr map entry key=%u expected=(%u,%u) got=(%u,%u)\x00failed to get page %u\x00freelist leaf count too big on page %u\x00size\x00overflow list length\x00%s is %u but should be %u\x00Tree %u page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00Tree %u page %u cell %u: \x00Tree %u page %u right child: \x00Offset %u out of range %u..%u\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %u bytes reported as %u on page %u\x00Freelist: \x00max rootpage (%u) disagrees with header (%u)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %u: never used\x00Page %u: pointer map referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00BINARY\x00B\x00N.\x00,%s%s%s\x00)\x00?\x008\x0016LE\x0016BE\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00subrtnsig:%d,%s\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\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00%s constraint failed\x00%z: %s\x00abort at %d: %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\x00into\x00out of\x00cannot change %s wal mode from within a transaction\x00database table is locked: %s\x00ValueList\x00-- %s\x00statement aborts at %d: %s; [%s]\x00real\x00integer\x00cannot open value of type %s\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open table with generated columns: %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\" - should this be a string literal in single-quotes?\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\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)\x00s\x00IN(...) element has %d term%s - expected %d\x00too many arguments on function %T\x00ORDER BY may not be used with non-aggregate %#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\x00true\x00false\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\x00CORRELATED \x00%sLIST SUBQUERY %d\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\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') WHEN quick_check GLOB 'non-* value in*' THEN raise(ABORT,'type mismatch on DEFAULT') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*' OR quick_check GLOB 'non-* value in*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00drop column from\x00rename columns of\x00cannot %s %s \"%s\"\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')\x00 \x00error in %s %s%s%s: %s\x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00PRIMARY KEY\x00cannot drop %s column: \"%s\"\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\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\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 COLLATE nocase\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\x00cannot use RETURNING in a trigger\x00sqlite_returning_%p\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'\x00SELECT*FROM\"%w\".\"%w\"\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\x00FIRST\x00LAST\x00unsupported use of NULLS %s\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\x00 UNIQUE\x00CREATE%s INDEX %.*s\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\x00ON\x00USING\x00a JOIN clause is required before %s\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%!0.15g\x00%!0.20e\x00%#Q\x00%Q\x00invalid Unicode escape\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\x00octet_length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00unhex\x00concat\x00concat_ws\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00unistr\x00quote\x00unistr_quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00string_agg\x00glob\x00ceil\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\x00if\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00SCAN %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\x00so\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]\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00builtin\x00enc\x00narg\x00flags\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00unique\x00origin\x00partial\x00wdth\x00hght\x00flgs\x00rowid\x00fkid\x00busy\x00checkpointed\x00file\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\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\x00utf8\x00utf16le\x00utf16be\x00w\x00a\x00sissii\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\x00wrong # of entries in index \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 \x00rowid not at end-of-record for row \x00 of index \x00 values differ from index \x00non-unique entry in index \x00ok\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00rename\x00drop column\x00add column\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\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\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()\x00CREATE BLOOM FILTER\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00LAST TERM OF \x00USE TEMP B-TREE FOR %sORDER BY\x00USE TEMP B-TREE FOR LAST %d TERMS OF ORDER BY\x00column%d\x00%.*z:%u\x00NUM\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00S\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%s\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00USE TEMP B-TREE FOR %s(ORDER BY)\x00 USING COVERING INDEX \x00SCAN %s%s%s\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\x00cannot create triggers on shadow tables\x00trigger %T already exists\x00cannot create trigger on system table\x00BEFORE\x00AFTER\x00cannot create %s trigger on view: %S\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'\x00DELETE\x00UPDATE\x00%s RETURNING is not available on virtual tables\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\x00vacuum_%016llx\x00ATTACH %Q AS %s\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 %s.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM %s.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO %s.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\x00syntax error\x00<expr>\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00SEARCH\x00SCAN\x00%s %S\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 \x000x%x:%s\x00%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\x00internal query planner error\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\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\x00near \"%T\": syntax error\x00ORDER BY\x00LIMIT\x00%s clause should come after %s not before\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00unknown table option: %.*s\x00set list\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\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\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\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\x00shared\x00private\x00mode\x00ro\x00rw\x00rwc\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\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\x00JSON cannot hold BLOB values\x00malformed JSON\x00inf\x009.0e999\x00infinity\x00QNaN\x00SNaN\x00json_%s() needs an odd number of arguments\x00\"\\/bfnrt\x00-9e999\x009e999\x00inity\x00\\\"\x00\\u0009\x00\\u00\x00\\u0000\x00,\n\x00: \x00bad JSON path: %Q\x00@\x00[\x00#\x00.\"\x00\"\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00 \x00FLAGS parameter to json_valid() must be between 1 and 15\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%lld]\x00.\"%.*s\"\x00.%.*s\x00$\x00json\x00jsonb\x00json_array\x00jsonb_array\x00json_array_length\x00json_error_position\x00json_extract\x00jsonb_extract\x00->\x00->>\x00json_insert\x00jsonb_insert\x00json_object\x00jsonb_object\x00json_patch\x00jsonb_patch\x00json_pretty\x00json_quote\x00json_remove\x00jsonb_remove\x00json_replace\x00jsonb_replace\x00json_set\x00jsonb_set\x00json_type\x00json_valid\x00json_group_array\x00jsonb_group_array\x00json_group_object\x00jsonb_group_object\x00json_each\x00json_tree\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\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\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\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\x00_node\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00,%.*s REAL\x00,%.*s INT\x00);\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\x00%_rowid\x00%_parent\x00Mapping (%lld -> %lld) missing from %s table\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\x00In RTree %s.%s:\n%z\x00wrong number of arguments to function rtreecheck()\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_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00geopoly\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;\x00AND rootpage!=0 AND rootpage IS NOT NULL\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\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\x00may not have\x00requires\x00table %q %s rbu_rowid column\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 NOT NULL\x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00%z, %z\x00 WITHOUT ROWID\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\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\x00AND\x00WHERE\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\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_\x00, _rowid_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00, 0 AS rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\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\x000 AS \x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\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\x00&\x00file:%s-vactmp?rbu_memory=1%s%s\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, %lld), (%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\x00vacuum\x00update\x00database modified during rbu %s\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00/\x00overflow\x00%s%.3x+%.6x\x00%s%.3x/\x00internal\x00leaf\x00corrupted\x00SELECT * FROM (SELECT 'sqlite_schema' AS name,1 AS rootpage,'table' AS type UNION ALL SELECT name,rootpage,type FROM \"%w\".sqlite_schema WHERE rootpage!=0)\x00WHERE name=%Q\x00 ORDER BY name\x00dbstat\x00SELECT 0, 'tbl', '', 0, '', 1, 0 UNION ALL SELECT 1, 'idx', '', 0, '', 2, 0 UNION ALL SELECT 2, 'stat', '', 0, '', 0, 0\x00PRAGMA '%q'.table_xinfo('%q')\x00SELECT\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00_rowid_, *\x00SELECT %s FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00%z%s\"%w\".\"%w\".\"%w\"\x00SELECT %s,%s FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00SELECT * FROM %Q.sqlite_schema\x00no such table: %s.%s\x00table schemas do not match\x00, 1\x00 AND (?6 OR ?3 IS stat)\x00tbl, idx\x00?1, (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00tbl, ?2, stat\x00?%d\x00 AND (?%d OR ?%d IS %w.%w)\x00SELECT %s%s FROM %Q.%Q WHERE (%s) IS (%s)\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00 WHERE \x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00 IS ?\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()\x00wrong number of arguments to function fts5_get_locale()\x00non-integer argument passed to function fts5_get_locale()\x00snippet\x00highlight\x00bm25\x00fts5_get_locale\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\x00contentless_delete\x00malformed contentless_delete=... directive\x00contentless_unindexed\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00locale\x00malformed locale=... directive\x00columns\x00malformed detail=... directive\x00tokendata\x00malformed tokendata=... directive\x00unrecognized option: \"%.*s\"\x00rank\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00, NULL\x00, T.l%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00contentless_delete=1 requires a contentless table\x00contentless_delete=1 is incompatible with columnsize=0\x00contentless_unindexed=1 requires a contentless table\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00deletemerge\x00secure-delete\x00insttoken\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d or %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)\x00phrase\x00fts5: %s queries are not supported (detail!=full)\x00fts5 expression tree is too large (maximum depth %d)\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=?\x00\xff\x00\x00\x01\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term>? ORDER BY term ASC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00DELETE FROM '%q'.'%q_idx' WHERE (segid, (pgno/2)) = (?1, ?2)\x00REPLACE INTO %Q.'%q_config' VALUES ('version', %d)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00\x00\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\x00DESC\x00ASC\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%.*s\x00%s: table does not support scanning\x00fts5: missing row %lld from content table %s\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\x00flush\x00%s a subset of columns on fts5 contentless-delete table: %s\x00%s contentless fts5 table: %s\x00cannot UPDATE\x00'delete' may not be used with a contentless_delete=1 table\x00cannot DELETE from contentless fts5 table: %s\x00fts5_locale() requires locale=1\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95\x00config\x00malformed inverted index for FTS5 table %s.%s\x00unable to validate the inverted index for FTS5 table %s.%s: %s\x00fts5\x00fts5_source_id\x00fts5_locale\x00fts5_insttoken\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(?,?%s)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz%s FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00%z%s?%d\x00%z,?%d\x00,?\x00,origin\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\x00, l%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00id INTEGER PRIMARY KEY, sz BLOB, origin INTEGER\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00DELETE FROM %Q.'%q_content';\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\x00trigram\x00ascii\x00porter\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\x002025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95\x00" type Sqlite3_int64 = sqlite3_int64 type Sqlite3_mutex_methods = sqlite3_mutex_methods |
